mirror of
https://github.com/kopia/kopia.git
synced 2026-05-11 16:25:13 -04:00
test(general): use require.Eventually to ensure test stops (#3530)
This commit is contained in:
@@ -403,11 +403,7 @@ func TestIndexEpochManager_NoCompactionInReadOnly(t *testing.T) {
|
||||
loadedDone.Store(true)
|
||||
}()
|
||||
|
||||
if !assert.Eventually(t, loadedDone.Load, time.Second*5, time.Second) {
|
||||
// Return early so we don't report some odd failure on the error check below
|
||||
// when we just never managed to initialize the epoch manager.
|
||||
return
|
||||
}
|
||||
require.Eventually(t, loadedDone.Load, time.Second*2, time.Second)
|
||||
|
||||
assert.Nil(t, loadedErr.Load(), "refreshing read-only index")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user