Skip to content

Commit

Permalink
Increase sleep and more explicit duration error log. Rel ethereumproj…
Browse files Browse the repository at this point in the history
  • Loading branch information
whilei committed Apr 24, 2017
1 parent f747f58 commit a0f65c9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions accounts/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,20 @@ func TestWatchNoDir(t *testing.T) {
// am should see the account.
wantAccounts := []Account{cachetestAccounts[0]}
wantAccounts[0].File = file
for d := 200 * time.Millisecond; d < 8*time.Second; d *= 2 {
seen := make(map[time.Duration]bool)
for d := 400 * time.Millisecond; d < 8 * time.Second; d *= 2 {
list = am.Accounts()
seen[d] = false
if reflect.DeepEqual(list, wantAccounts) {
return
seen[d] = true
}
time.Sleep(d)
}
t.Errorf("\ngot %v\nwant %v", list, wantAccounts)
for _, saw := range seen {
if !saw {
t.Errorf("\ngot %v\nwant %v, with: %v", list, wantAccounts, seen)
}
}
}

func TestCacheInitialReload(t *testing.T) {
Expand Down

0 comments on commit a0f65c9

Please sign in to comment.