From 451507a6d129353a1aecfd1d22dd9459dcc5a1d7 Mon Sep 17 00:00:00 2001 From: Damian Debkowski Date: Fri, 20 Dec 2024 12:02:55 -0800 Subject: [PATCH] test --- .../cluster/sequential/session_cleanup_test.go | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/internal/tests/cluster/sequential/session_cleanup_test.go b/internal/tests/cluster/sequential/session_cleanup_test.go index 16b0fdad99..88b97c7d3f 100644 --- a/internal/tests/cluster/sequential/session_cleanup_test.go +++ b/internal/tests/cluster/sequential/session_cleanup_test.go @@ -334,16 +334,14 @@ func testWorkerSessionCleanupMulti(burdenCase timeoutBurdenType) func(t *testing // successful status report to ensure this. event.WriteSysEvent(ctx, op, "pausing link to controller #1") p1.Pause() - err = w1.Worker().WaitForNextSuccessfulStatusUpdate() - require.NoError(err) + helper.ExpectWorkers(t, c2, w1) sConn.TestSendRecvAll(t) // Resume first controller, pause second. This one should work too. event.WriteSysEvent(ctx, op, "pausing link to controller #2, resuming #1") p1.Resume() p2.Pause() - err = w1.Worker().WaitForNextSuccessfulStatusUpdate() - require.NoError(err) + helper.ExpectWorkers(t, c1, w1) sConn.TestSendRecvAll(t) // Kill the first controller connection again. This one should fail @@ -373,8 +371,16 @@ func testWorkerSessionCleanupMulti(burdenCase timeoutBurdenType) func(t *testing event.WriteSysEvent(ctx, op, "resuming connections to both controllers") p1.Resume() p2.Resume() - err = w1.Worker().WaitForNextSuccessfulStatusUpdate() - require.NoError(err) + wg.Add(2) + go func() { + defer wg.Done() + helper.ExpectWorkers(t, c1, w1) + }() + go func() { + defer wg.Done() + helper.ExpectWorkers(t, c2, w1) + }() + wg.Wait() // Do something post-reconnect depending on burden case. Note in // the default case, both worker and controller should be