ethclient/simulated: add timeout to fix flaky test

This commit is contained in:
Martin Holst Swende 2024-01-16 12:53:39 +01:00
parent d4f25b4dcf
commit 54c35d9581
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -230,6 +230,9 @@ func TestForkResendTx(t *testing.T) {
// 5. // 5.
sim.Commit() sim.Commit()
// The new-head-event needs to trickle out to the tx pool(s), so they reset
// their internal state.
time.Sleep(1 * time.Second)
if err := client.SendTransaction(ctx, tx); err != nil { if err := client.SendTransaction(ctx, tx); err != nil {
t.Fatalf("sending transaction: %v", err) t.Fatalf("sending transaction: %v", err)
} }