Closed kianmeng closed 4 months ago
The mentioned error:
$ mix test --exclude requires_internet_connection
Running ExUnit with seed: 329366, max_cases: 24
Excluding tags: [:requires_internet_connection, :proxy]
....................................................................................
1) test twitter.com timeout with http (Mint.HTTP1.IntegrationTest)
test/mint/http1/integration_test.exs:104
match (=) failed
code: assert {:error, %TransportError{reason: :timeout}} =
HTTP1.connect(:http, "twitter.com", 80, transport_opts: [timeout: 0])
left: {:error, %Mint.TransportError{reason: :timeout}}
right: {:error, %Mint.TransportError{reason: :nxdomain, __exception__: true}}
stacktrace:
test/mint/http1/integration_test.exs:105: (test)
.................
2) test twitter.com timeout with https (Mint.HTTP1.IntegrationTest)
test/mint/http1/integration_test.exs:109
match (=) failed
code: assert {:error, %TransportError{reason: :timeout}} =
HTTP1.connect(:https, "twitter.com", 443, transport_opts: [timeout: 0])
left: {:error, %Mint.TransportError{reason: :timeout}}
right: {:error, %Mint.TransportError{reason: :nxdomain, __exception__: true}}
stacktrace:
test/mint/http1/integration_test.exs:110: (test)
...
Totals | |
---|---|
Change from base Build 61f0989bf26e014a2c165295a38123792c662206: | 0.0% |
Covered Lines: | 1275 |
Relevant Lines: | 1459 |
:partying_face: :partying_face: :partying_face: :partying_face: :partying_face:
This should resolve the errors when excluding test with :requires_internet_connection tag for http1 tests using the following command.