mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-14 12:06:40 +00:00
accounts/keystore: fix flaky test (#21703)
* accounts/keystore: add timeout to test to prevent failure on travis The TestWalletNotifications test sporadically fails on travis. This is because we shutdown the event collection before all events are received. Adding a small timeout (10 milliseconds) allows the collector to be scheduled and to consume all pending events before we shut it down. * accounts/keystore: added newlines back in * accounts/keystore: properly fix the walletNotifications test
This commit is contained in:
parent
1e10489196
commit
1fed223483
1 changed files with 3 additions and 1 deletions
|
|
@ -336,7 +336,9 @@ func TestWalletNotifications(t *testing.T) {
|
||||||
|
|
||||||
// Shut down the event collector and check events.
|
// Shut down the event collector and check events.
|
||||||
sub.Unsubscribe()
|
sub.Unsubscribe()
|
||||||
<-updates
|
for ev := range updates {
|
||||||
|
events = append(events, walletEvent{ev, ev.Wallet.Accounts()[0]})
|
||||||
|
}
|
||||||
checkAccounts(t, live, ks.Wallets())
|
checkAccounts(t, live, ks.Wallets())
|
||||||
checkEvents(t, wantEvents, events)
|
checkEvents(t, wantEvents, events)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue