diff options
-rw-r--r-- | src/rabbit_tests.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl index bbca55b4..cd5d9be0 100644 --- a/src/rabbit_tests.erl +++ b/src/rabbit_tests.erl @@ -1471,7 +1471,11 @@ expect_events(Pid, Type) -> expect_event(Pid, Type). expect_event(Pid, Type) -> - receive #event{type = Type, props = Props} -> Pid = pget(pid, Props) + receive #event{type = Type, props = Props} -> + case pget(pid, Props) of + Pid -> ok; + _ -> expect_event(Pid, Type) + end after 1000 -> throw({failed_to_receive_event, Type}) end. |