Skip to content

TestDialWithBackoff from network/transports_test.go fails by not recognizing expected error outside of CI #2401

@cardil

Description

@cardil

Expected Behavior

Test should pass without errors on any environment.

Actual Behavior

Test fails with:

$ gotestsum -f testname -- -race -count=1 -run 'TestDialWithBackoff' ./network
=== RUN   TestDialWithBackoff
    transports_test.go:91: Error = dial tcp4 198.18.0.254:8888: connect: network is unreachable, want: timed out dialing(...)
--- FAIL: TestDialWithBackoff (0.00s)
FAIL network.TestDialWithBackoff (0.00s)
FAIL network

=== Failed
=== FAIL: network TestDialWithBackoff (0.00s)
    transports_test.go:91: Error = dial tcp4 198.18.0.254:8888: connect: network is unreachable, want: timed out dialing(...)

DONE 1 tests, 1 failure in 0.489s

Steps to Reproduce the Problem

  1. gotestsum -f testname -- -race -count=1 -run 'TestDialWithBackoff' ./network

Additional Info

The test is using a special address 198.18.0.254:8888 that looks to work on the CI environment. I think a good idea would be to refactor tests to work on every environment, cutting this external dependency.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions