summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2011-10-19 10:48:15 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2011-10-19 10:48:15 +0100
commit60e748f1b5564ef3ea20942495c6cc6dac09fe57 (patch)
tree9c4dfcf021df4c1cc05798cd3a619e442fd356b9
parent9fbeead413e727c9bc2c91b26bc00ea34cef610c (diff)
downloadrabbitmq-server-60e748f1b5564ef3ea20942495c6cc6dac09fe57.tar.gz
yet another attempt to reduce timeouts in CI
- catch surplus eagerly - wait longer for confirms, wait shorter for any surplus
-rw-r--r--src/rabbit_tests.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl
index bfae0b06..bd89d54d 100644
--- a/src/rabbit_tests.erl
+++ b/src/rabbit_tests.erl
@@ -1704,6 +1704,8 @@ on_disk_capture() ->
stop -> done
end.
+on_disk_capture([_|_], _Awaiting, Pid) ->
+ Pid ! {self(), surplus};
on_disk_capture(OnDisk, Awaiting, Pid) ->
receive
{on_disk, MsgIdsS} ->
@@ -1712,12 +1714,10 @@ on_disk_capture(OnDisk, Awaiting, Pid) ->
Pid);
stop ->
done
- after 500 ->
- case {OnDisk, Awaiting} of
- {[], []} -> Pid ! {self(), arrived}, on_disk_capture();
- {_, []} -> Pid ! {self(), surplus};
- {[], _} -> Pid ! {self(), timeout};
- {_, _} -> Pid ! {self(), surplus_timeout}
+ after (case Awaiting of [] -> 200; _ -> 1000 end) ->
+ case Awaiting of
+ [] -> Pid ! {self(), arrived}, on_disk_capture();
+ _ -> Pid ! {self(), timeout}
end
end.