From c33475f63eefaaa4d1ec424dbfc435bfa53f791c Mon Sep 17 00:00:00 2001 From: paul cannon Date: Wed, 4 Oct 2023 09:50:53 -0500 Subject: [PATCH] storagenode/gracefulexit: fix flaky test (hopefully) If the storagenode chore is left running and it has a chance to check in again after we move time forward (line 139), then the satellite will mark it as having finished GE before we check which nodes are still in GE (line 149). Change-Id: I350e1ef2e943f758d44132aaddd05fe248b30f3e --- storagenode/gracefulexit/chore_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storagenode/gracefulexit/chore_test.go b/storagenode/gracefulexit/chore_test.go index 500837b69..cd60fed7a 100644 --- a/storagenode/gracefulexit/chore_test.go +++ b/storagenode/gracefulexit/chore_test.go @@ -131,6 +131,8 @@ func exitSatellite(ctx context.Context, t *testing.T, planet *testplanet.Planet, // initiate graceful exit on satellite side by running the SN chore. exitingNode.GracefulExit.Chore.Loop.TriggerWait() + exitingNode.GracefulExit.Chore.Loop.Pause() + // jump ahead in time (the +2 is to account for things like daylight savings shifts that may // be happening in the next while, since we're not using AddDate here). timeMutex.Lock()