mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 05:36:46 +00:00
eth: sleep for first 3 seconds since it can't finish faster
This commit is contained in:
parent
8574028a97
commit
886b0e26e3
1 changed files with 4 additions and 2 deletions
|
|
@ -88,8 +88,10 @@ func testSnapSyncDisabling(t *testing.T, ethVer uint, snapVer uint) {
|
||||||
if err := empty.handler.downloader.BeaconSync(ethconfig.SnapSync, full.chain.CurrentBlock(), nil); err != nil {
|
if err := empty.handler.downloader.BeaconSync(ethconfig.SnapSync, full.chain.CurrentBlock(), nil); err != nil {
|
||||||
t.Fatal("sync failed:", err)
|
t.Fatal("sync failed:", err)
|
||||||
}
|
}
|
||||||
// Wait for downloader to finish processing with a timeout
|
// Downloader internally has to wait for a timer (3s) to be expired before
|
||||||
for timeout := time.After(5 * time.Second); ; {
|
// exiting. Poll after to determine if sync is disabled.
|
||||||
|
time.Sleep(time.Second * 3)
|
||||||
|
for timeout := time.After(time.Second); ; {
|
||||||
select {
|
select {
|
||||||
case <-timeout:
|
case <-timeout:
|
||||||
t.Fatalf("snap sync not disabled after successful synchronisation")
|
t.Fatalf("snap sync not disabled after successful synchronisation")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue