launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #30831
[Merge] ~ines-almeida/launchpad:increase-unittest-fetch-timeout into launchpad:master
Ines Almeida has proposed merging ~ines-almeida/launchpad:increase-unittest-fetch-timeout into launchpad:master.
Commit message:
test: increase timeout in test that often times out
test_urlfetch_writes_to_output_file often times out, this increases the timeout for that particular test to double to prevent inconsistent test failures
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/458930
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:increase-unittest-fetch-timeout into launchpad:master.
diff --git a/lib/lp/services/tests/test_timeout.py b/lib/lp/services/tests/test_timeout.py
index 0c68401..a776668 100644
--- a/lib/lp/services/tests/test_timeout.py
+++ b/lib/lp/services/tests/test_timeout.py
@@ -510,7 +510,9 @@ class TestTimeout(TestCase):
t = threading.Thread(target=success_result)
t.start()
output_path = self.useFixture(TempDir()).join("out")
- with open(output_path, "wb+") as f:
+ # Default timeout (30s) is often not enough for this test.
+ # We temporarily override timeout to be 60s.
+ with open(output_path, "wb+") as f, override_timeout(60):
urlfetch(http_server_url, output_file=f)
f.seek(0)
self.assertEqual(b"Success.", f.read())
Follow ups