Commit 3ad2a9dd authored by Matthew Slipper's avatar Matthew Slipper

op-e2e: Ignore i/o timeouts in receipts fetching

Ignore i/o timeouts when fetching receipts. This is causing spurious failures in the indexer tests. We already have a 2 minute timeout within this method via an internal context, so there is no value in erroring out on what could (potentially) be an unrelated network failure.

If there is some other underlying error in the indexer tests, we'll be able to see that because the tests will fail with `context deadline exceeded`.
parent 283f0aa2
...@@ -5,6 +5,7 @@ import ( ...@@ -5,6 +5,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"math/big" "math/big"
"os"
"time" "time"
"github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum"
...@@ -53,6 +54,9 @@ func ForReceipt(ctx context.Context, client *ethclient.Client, hash common.Hash, ...@@ -53,6 +54,9 @@ func ForReceipt(ctx context.Context, client *ethclient.Client, hash common.Hash,
continue continue
} }
} }
if errors.Is(err, os.ErrDeadlineExceeded) {
continue
}
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to get receipt: %w", err) return nil, fmt.Errorf("failed to get receipt: %w", err)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment