elixir-mint / mint

Functional HTTP client for Elixir with support for HTTP/1 and HTTP/2 🌱
Apache License 2.0
1.37k stars 112 forks source link

Fix http1 integration tests missing :requires_internet_connection tag #443

Closed kianmeng closed 4 months ago

kianmeng commented 4 months ago

This should resolve the errors when excluding test with :requires_internet_connection tag for http1 tests using the following command.

mix test --exclude requires_internet_connection
kianmeng commented 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)
...
coveralls commented 4 months ago

Pull Request Test Coverage Report for Build a2eeaa494557661cca3c5ae613d0f6c0b6c777ae-PR-443

Details


Totals Coverage Status
Change from base Build 61f0989bf26e014a2c165295a38123792c662206: 0.0%
Covered Lines: 1275
Relevant Lines: 1459

💛 - Coveralls
kianmeng commented 4 months ago

:partying_face: :partying_face: :partying_face: :partying_face: :partying_face: