Remove the real sleep from the recovery integration test
Builds: design 47 G (playbook 07 step 2: no real sleeping in a test) Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -238,7 +238,7 @@ func TestNatsTheRecoveryStepAsksHearsBoundsAndCatchesUpOverTheBus(t *testing.T)
|
|||||||
b.want("db", fpOld, "", meshwants.WantsByWantNodeModuleValueBackupAgain)
|
b.want("db", fpOld, "", meshwants.WantsByWantNodeModuleValueBackupAgain)
|
||||||
within(t, 20*time.Second, "the restore of the revert is not asked", func() bool { return restores.Load() == 2 })
|
within(t, 20*time.Second, "the restore of the revert is not asked", func() bool { return restores.Load() == 2 })
|
||||||
within(t, 20*time.Second, "the have does not wait for the restore", func() bool { return b.have("db").Phase == nec.PhaseBackingUp })
|
within(t, 20*time.Second, "the have does not wait for the restore", func() bool { return b.have("db").Phase == nec.PhaseBackingUp })
|
||||||
time.Sleep(300 * time.Millisecond) // the older build must not be applied while the stand-in has not said restored
|
// The restored event is held until close(release): the older build must not be applied before the stand-in says restored.
|
||||||
if h := b.have("db"); h.Phase != nec.PhaseBackingUp || b.file("db") != "v2\n" || toolCalls.Load() != calls {
|
if h := b.have("db"); h.Phase != nec.PhaseBackingUp || b.file("db") != "v2\n" || toolCalls.Load() != calls {
|
||||||
t.Fatalf("before the stand-in says restored the have is %+v, the file %q, %d catch-up call(s) more", h, b.file("db"), toolCalls.Load()-calls)
|
t.Fatalf("before the stand-in says restored the have is %+v, the file %q, %d catch-up call(s) more", h, b.file("db"), toolCalls.Load()-calls)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user