summaryrefslogtreecommitdiff
path: root/src
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
commit20aa893754c121c294fdf93a9245aa953be0dcd9 (patch)
tree9c4dfcf021df4c1cc05798cd3a619e442fd356b9 /src
parent68f4bca221d30fd717a20fce658e06ebae9a8028 (diff)
downloadrabbitmq-server-git-20aa893754c121c294fdf93a9245aa953be0dcd9.tar.gz
yet another attempt to reduce timeouts in CI
- catch surplus eagerly - wait longer for confirms, wait shorter for any surplus
Diffstat (limited to 'src')
-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 bfae0b06df..bd89d54daf 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.