Unverified Commit 80cc34ac authored by Martin Holst Swende's avatar Martin Holst Swende Committed by GitHub

eth/downloader: make flakey test less flakey (#25879)

parent 13e69859
...@@ -803,7 +803,7 @@ func TestSkeletonSyncRetrievals(t *testing.T) { ...@@ -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) { ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment