From c3d712b3e31483009b25e42ea88c29f6ceb463b4 Mon Sep 17 00:00:00 2001 From: Luke Bakken Date: Thu, 8 Aug 2019 15:25:39 -0700 Subject: [PATCH] Add a sleep to (maybe) fix a test on Travis CI --- test/lager_test_backend.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/lager_test_backend.erl b/test/lager_test_backend.erl index 69489b9..1a21238 100644 --- a/test/lager_test_backend.erl +++ b/test/lager_test_backend.erl @@ -1790,7 +1790,7 @@ async_threshold_test_() -> %% serialize on mailbox _ = gen_event:which_handlers(lager_event), - timer:sleep(500), + timer:sleep(1000), %% By now the flood of messages should have forced the backend throttle %% to turn off async mode, but it's possible all outstanding requests @@ -1812,6 +1812,7 @@ async_threshold_test_() -> timer:sleep(1000), lager:info("hello world"), _ = gen_event:which_handlers(lager_event), + timer:sleep(1000), %% async is true again now that the mailbox has drained ?assertEqual(true, lager_config:get(async)),