mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 21:26:42 +00:00
Update sync_test.go
This commit is contained in:
parent
8c58f4920d
commit
1c57917465
1 changed files with 6 additions and 1 deletions
|
|
@ -88,7 +88,12 @@ func testSnapSyncDisabling(t *testing.T, ethVer uint, snapVer uint) {
|
|||
if err := empty.handler.downloader.BeaconSync(ethconfig.SnapSync, full.chain.CurrentBlock(), nil); err != nil {
|
||||
t.Fatal("sync failed:", err)
|
||||
}
|
||||
time.Sleep(time.Second * 5) // Downloader internally has to wait a timer (3s) to be expired before exiting
|
||||
// Wait for downloader to finish processing with a timeout
|
||||
for t0 := time.Now(); time.Since(t0) < 10*time.Second; time.Sleep(100 * time.Millisecond) {
|
||||
if !empty.handler.snapSync.Load() {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if empty.handler.snapSync.Load() {
|
||||
t.Fatalf("snap sync not disabled after successful synchronisation")
|
||||
|
|
|
|||
Loading…
Reference in a new issue