mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-17 21:46:36 +00:00
eth/downloader: make flakey test less flakey (#25879)
This commit is contained in:
parent
13e6985929
commit
80cc34ac3c
1 changed files with 2 additions and 2 deletions
|
|
@ -803,7 +803,7 @@ func TestSkeletonSyncRetrievals(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
waitStart := time.Now()
|
waitStart := time.Now()
|
||||||
for waitTime := 20 * time.Millisecond; time.Since(waitStart) < time.Second; waitTime = waitTime * 2 {
|
for waitTime := 20 * time.Millisecond; time.Since(waitStart) < 2*time.Second; waitTime = waitTime * 2 {
|
||||||
time.Sleep(waitTime)
|
time.Sleep(waitTime)
|
||||||
// Check the post-init end state if it matches the required results
|
// Check the post-init end state if it matches the required results
|
||||||
json.Unmarshal(rawdb.ReadSkeletonSyncStatus(db), &progress)
|
json.Unmarshal(rawdb.ReadSkeletonSyncStatus(db), &progress)
|
||||||
|
|
@ -855,7 +855,7 @@ func TestSkeletonSyncRetrievals(t *testing.T) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
waitStart = time.Now()
|
waitStart = time.Now()
|
||||||
for waitTime := 20 * time.Millisecond; time.Since(waitStart) < time.Second; waitTime = waitTime * 2 {
|
for waitTime := 20 * time.Millisecond; time.Since(waitStart) < 2*time.Second; waitTime = waitTime * 2 {
|
||||||
time.Sleep(waitTime)
|
time.Sleep(waitTime)
|
||||||
// Check the post-init end state if it matches the required results
|
// Check the post-init end state if it matches the required results
|
||||||
json.Unmarshal(rawdb.ReadSkeletonSyncStatus(db), &progress)
|
json.Unmarshal(rawdb.ReadSkeletonSyncStatus(db), &progress)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue