satellite/gracefulexit: Try avoiding randomly test failure

The test function fails randomly in the CI when runs with CRDB. There
isn't currently an explanation why the expectation of number of nodes
which exited 4 minutes ago reports 4 nodes rather than 5 and the only
clue that we have now to see if it gets remedied is to give 2 minutes
rather than 1 to the node that exited close to the time passed function
which makes the test to randomly fail.

Change-Id: I3a731e3eb7f19caebdf29713150727f2cf3e0e0a
This commit is contained in:
Ivan Fraixedes 2021-04-21 17:40:07 +02:00
parent 8b2e18c910
commit 2537bbf543
No known key found for this signature in database
GPG Key ID: 042B474597F96DB7

View File

@ -77,7 +77,7 @@ func TestGracefulExit_DeleteAllFinishedTransferQueueItems(t *testing.T) {
}, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) {
var (
cache = planet.Satellites[0].DB.OverlayCache()
currentTime = time.Now()
currentTime = time.Now().UTC()
)
// mark some of the storagenodes as successful exit
@ -106,7 +106,7 @@ func TestGracefulExit_DeleteAllFinishedTransferQueueItems(t *testing.T) {
NodeID: nodeSuccessful3.ID(),
ExitInitiatedAt: currentTime.Add(-time.Hour),
ExitLoopCompletedAt: currentTime.Add(-9 * time.Minute),
ExitFinishedAt: currentTime.Add(-5 * time.Minute),
ExitFinishedAt: currentTime.Add(-6 * time.Minute),
ExitSuccess: true,
})
require.NoError(t, err)