Skip to content

Commit

Permalink
stabilize test_direct_tcpip
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Oct 17, 2022
1 parent 7066dd5 commit 38eff07
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_ssh_proto.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,10 @@ def test_direct_tcpip(
if response.status_code == 200:
break

response = requests.get(f'http://localhost:{local_port}', timeout=timeout)
print(response.text)
s = requests.Session()
retries = requests.adapters.Retry(total=5, backoff_factor=1)
s.mount('http://', requests.adapters.HTTPAdapter(max_retries=retries))
response = s.get(f'http://localhost:{local_port}', timeout=timeout)
assert response.status_code == 200
ssh_client.kill()

Expand Down

0 comments on commit 38eff07

Please sign in to comment.