Resolve TestDefragInterrupted NDF
BUG FIX
Description of Bug and Fix
There is the following ndf
--- FAIL: TestDefragInterrupted (6.39s)
defrag_test.go:254: There should be 0 outputs in the database since defrag failed but there were 36
The test had some sleeps in the test, I replaced the sleeps with build retry's.
Proof of Fix
Added for loop to help bring out NDF, loop runs test 10 times
- Before Fix, Failing pipeline on 15th test run: https://gitlab.com/NebulousLabs/Sia/-/jobs/99474362
- After Fix, Passing pipeline (each with test run 10x):
- Using 20s for
build.Retry
- PASS:- using
buils.Retry
with 20s timeout limit - https://gitlab.com/NebulousLabs/Sia/-/jobs/99480565
- https://gitlab.com/NebulousLabs/Sia/-/jobs/99772261
- https://gitlab.com/NebulousLabs/Sia/-/jobs/99787555
- using
- using 5s for
build.Retry
and removed additional sleep and block mined - FAIL: - using 5s for
build.Retry
with sleep with sleep and block mined - PASS - using 20s for
build.Retry
and removed additional sleep and block mined - FAIL:- Failed locally
working on #3176 (closed)
Edited by Matthew Sevey