diff --git a/op-e2e/system/runcfg/protocol_versions_test.go b/op-e2e/system/runcfg/protocol_versions_test.go index 14e056b04435..7decd5eb2261 100644 --- a/op-e2e/system/runcfg/protocol_versions_test.go +++ b/op-e2e/system/runcfg/protocol_versions_test.go @@ -130,7 +130,13 @@ func TestRequiredProtocolVersionChangeAndHalt(t *testing.T) { _, err = retry.Do(context.Background(), 10, retry.Fixed(time.Second*10), func() (struct{}, error) { ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() - available := client.IsURLAvailable(ctx, sys.NodeEndpoint("verifier").(endpoint.HttpRPC).HttpRPC()) + url := sys.NodeEndpoint("verifier").(endpoint.HttpRPC).HttpRPC() + // The URL of the verifier op-geth becomes empty after it is stopped. + // In this case, IsURLAvailable() returns an incorrect value when port 80 happens to be occupied by another process. + if url == "http://" { + return struct{}{}, nil + } + available := client.IsURLAvailable(ctx, url) if !available && ctx.Err() == nil { // waiting for client to stop responding to RPC requests (slow dials with timeout don't count) return struct{}{}, nil }