Skip to content

Commit ebe5ab2

Browse files
committed
Test cleanup.
1 parent 4aa92af commit ebe5ab2

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.github/workflows/nightly.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ jobs:
3232
uses: nick-fields/retry@v3
3333
with:
3434
timeout_minutes: 15
35-
retry_wait_seconds: 60
36-
max_attempts: 4
35+
retry_wait_seconds: 30
36+
max_attempts: 3
3737
command: make install test

tests/test_ngrok.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,7 @@ def test_tunnel_definitions_v3(self):
627627
http_tunnel = ngrok.connect(name="http-tunnel", pyngrok_config=pyngrok_config)
628628
ssh_tunnel = ngrok.connect(name="tcp-tunnel", pyngrok_config=pyngrok_config)
629629
time.sleep(1)
630-
response = urlopen(http_tunnel.public_url)
631-
time.sleep(3)
630+
response_body = urlopen(http_tunnel.public_url).read().decode()
632631

633632
# THEN
634633
self.assertEqual(http_tunnel.name, "http-tunnel")
@@ -637,7 +636,7 @@ def test_tunnel_definitions_v3(self):
637636
self.assertTrue(http_tunnel.config["addr"].startswith("http://"))
638637
self.assertEqual(http_tunnel.public_url,
639638
f"https://{config['tunnels']['http-tunnel']['subdomain']}.ngrok.io")
640-
self.assertIn("Sign in - Google Accounts", response.read().decode())
639+
self.assertIn("Sign in - Google Accounts", response_body)
641640
self.assertEqual(ssh_tunnel.name, "tcp-tunnel")
642641
self.assertEqual(ssh_tunnel.config["addr"],
643642
f"localhost:{config['tunnels']['tcp-tunnel']['addr']}")

0 commit comments

Comments
 (0)