Skip to content

Commit e41e9df

Browse files
chris124567ChrisSchinnerl
authored andcommitted
nit
1 parent 2e3ce91 commit e41e9df

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

persist/sqlite/scan_test.go

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -377,20 +377,13 @@ func TestScan(t *testing.T) {
377377
waitForTip := func() {
378378
t.Helper()
379379

380-
const duration = time.Second
381380
for {
382-
tip, err := e.Tip()
383-
if errors.Is(err, explorer.ErrNoTip) {
384-
time.Sleep(duration)
385-
continue
386-
} else if err != nil {
381+
if tip, err := e.Tip(); err != nil && !errors.Is(err, explorer.ErrNoTip) {
387382
t.Fatal(err)
388-
}
389-
if tip != cm.Tip() {
390-
time.Sleep(duration)
391-
} else {
383+
} else if tip == cm.Tip() {
392384
break
393385
}
386+
time.Sleep(time.Second)
394387
}
395388
}
396389
waitForTip()

0 commit comments

Comments
 (0)