Skip to content

Commit

Permalink
Stabilize remote tests for potential connection errors
Browse files Browse the repository at this point in the history
  • Loading branch information
whimboo committed Jun 26, 2024
1 parent 77cb5b1 commit b13004b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/remote/test_devedition.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
])
def test_release_scraper(tmpdir, args, url):
"""Test release scraper against the remote server."""
args.update({"retry_attempts": 5, "retry_delay": 0.1})
scraper = mozdownload.ReleaseScraper(destination=tmpdir, **args)

if url:
Expand All @@ -56,6 +57,7 @@ def test_release_scraper(tmpdir, args, url):
])
def test_candidate_scraper(tmpdir, args, url):
"""Test release candidate scraper against the remote server."""
args.update({"retry_attempts": 5, "retry_delay": 0.1})
scraper = mozdownload.ReleaseCandidateScraper(destination=tmpdir, **args)

assert unquote(scraper.url) == urljoin(BASE_URL, url)
2 changes: 2 additions & 0 deletions tests/remote/test_fenix.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
])
def test_release_scraper(tmpdir, args, url):
"""Test release scraper against the remote server."""
args.update({"retry_attempts": 5, "retry_delay": 0.1})
scraper = mozdownload.ReleaseScraper(destination=tmpdir, **args)

if url:
Expand All @@ -80,4 +81,5 @@ def test_release_scraper(tmpdir, args, url):
'extension': 'apk'},
])
def test_daily_scraper(tmpdir, args):
args.update({"retry_attempts": 5, "retry_delay": 0.1})
mozdownload.DailyScraper(destination=tmpdir, **args)
4 changes: 4 additions & 0 deletions tests/remote/test_firefox.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
])
def test_release_scraper(tmpdir, args, url):
"""Test release scraper against the remote server."""
args.update({"retry_attempts": 5, "retry_delay": 0.1})
scraper = mozdownload.ReleaseScraper(destination=tmpdir, **args)

if url:
Expand Down Expand Up @@ -70,6 +71,7 @@ def test_release_scraper(tmpdir, args, url):
])
def test_candidate_scraper(tmpdir, args, url):
"""Test release candidate scraper against the remote server."""
args.update({"retry_attempts": 5, "retry_delay": 0.1})
scraper = mozdownload.ReleaseCandidateScraper(destination=tmpdir, **args)

assert unquote(scraper.url) == urljoin(BASE_URL, url)
Expand Down Expand Up @@ -99,6 +101,7 @@ def test_candidate_scraper(tmpdir, args, url):
])
def test_daily_scraper(tmpdir, args):
"""Test daily scraper against the remote server."""
args.update({"retry_attempts": 5, "retry_delay": 0.1})
mozdownload.DailyScraper(destination=tmpdir, **args)


Expand All @@ -115,6 +118,7 @@ def test_daily_scraper(tmpdir, args):
])
def test_tinderbox_scraper(tmpdir, args):
"""Test tinderbox scraper against the remote server."""
args.update({"retry_attempts": 5, "retry_delay": 0.1})
mozdownload.TinderboxScraper(destination=tmpdir, **args)


Expand Down
4 changes: 4 additions & 0 deletions tests/remote/test_thunderbird.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
])
def test_release_scraper(tmpdir, args, url):
"""Test release scraper against the remote server."""
args.update({"retry_attempts": 5, "retry_delay": 0.1})
scraper = mozdownload.ReleaseScraper(destination=tmpdir, **args)

if url:
Expand All @@ -54,6 +55,7 @@ def test_release_scraper(tmpdir, args, url):
])
def test_candidate_scraper(tmpdir, args, url):
"""Test release candidate scraper against the remote server."""
args.update({"retry_attempts": 5, "retry_delay": 0.1})
scraper = mozdownload.ReleaseCandidateScraper(destination=tmpdir, **args)

assert unquote(scraper.url) == urljoin(BASE_URL, url)
Expand All @@ -77,6 +79,7 @@ def test_candidate_scraper(tmpdir, args, url):
])
def test_daily_scraper(tmpdir, args):
"""Test daily scraper against the remote server."""
args.update({"retry_attempts": 5, "retry_delay": 0.1})
mozdownload.DailyScraper(destination=tmpdir, **args)


Expand All @@ -96,6 +99,7 @@ def test_daily_scraper(tmpdir, args):
@pytest.mark.xfail(strict=True, reason="tinderbox builds not available in the archive")
def test_tinderbox_scraper(tmpdir, args):
"""Test tinderbox scraper against the remote server."""
args.update({"retry_attempts": 5, "retry_delay": 0.1})
mozdownload.TinderboxScraper(destination=tmpdir, **args)


Expand Down

0 comments on commit b13004b

Please sign in to comment.