From 27656eafaa5cb4534ec2e262fecee11b023aabb9 Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Wed, 26 Aug 2015 14:38:56 +0900 Subject: [PATCH] Fix (via sleep, egadz) race condition in machi_flu_psup_test --- test/machi_flu_psup_test.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/machi_flu_psup_test.erl b/test/machi_flu_psup_test.erl index e6095fb..8a45963 100644 --- a/test/machi_flu_psup_test.erl +++ b/test/machi_flu_psup_test.erl @@ -135,11 +135,12 @@ partial_stop_restart2() -> {FluName_a, _} = hd(Ps), ok = machi_flu_psup:stop_flu_package(FluName_a), {ok, _} = Start(hd(Ps)), + timer:sleep(123), % TODO fix server socket available race condition in better way %% Remember: 'a' is not in active mode. {ok, Proj_m3} = machi_projection_store:read_latest_projection( hd(PStores), private), true = (machi_projection:update_dbg2(Proj_m, []) == - machi_projection:update_dbg2(Proj_m, [])), + machi_projection:update_dbg2(Proj_m3, [])), %% Confirm that 'a' is wedged {error, wedged} = Append(hd(Ps), EpochID1), {_, #p_srvr{address=Addr_a, port=TcpPort_a}} = hd(Ps),