From 35f09f7f22c81fb28933ad876cd75a43c084fe64 Mon Sep 17 00:00:00 2001 From: Chun-Hung Tseng Date: Fri, 12 Apr 2024 03:19:33 +0200 Subject: [PATCH] Add a 5s delay after unblackholing (for the catch-up to work) Shorten the wait time for the open connection to expire to 5s Signed-off-by: Chun-Hung Tseng --- tests/e2e/blackhole_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/e2e/blackhole_test.go b/tests/e2e/blackhole_test.go index 81e482e6d4cd..68150cb8608a 100644 --- a/tests/e2e/blackhole_test.go +++ b/tests/e2e/blackhole_test.go @@ -63,8 +63,8 @@ func blackholeTestByMockingPartition(t *testing.T, clusterSize int, partitionLea proxy.BlackholeTx() proxy.BlackholeRx() - t.Logf("Wait 20s for any open connections to expire") - time.Sleep(20 * time.Second) + t.Logf("Wait 5s for any open connections to expire") + time.Sleep(5 * time.Second) t.Logf("Wait for new leader election with remaining members") leaderEPC := epc.Procs[waitLeader(t, epc, mockPartitionNodeIndex)] @@ -83,6 +83,7 @@ func blackholeTestByMockingPartition(t *testing.T, clusterSize int, partitionLea proxy.UnblackholeRx() leaderEPC = epc.Procs[epc.WaitLeader(t)] + time.Sleep(5 * time.Second) assertRevision(t, leaderEPC, 21) assertRevision(t, partitionedMember, 21) }