Skip to content

Commit

Permalink
[WIP] Fix tool shed tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Oct 23, 2023
1 parent 3ccccc8 commit 886ac29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/tool_shed/test/base/playwrightbrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ def __init__(self, page: Page):
self._page = page

def visit_url(self, url: str, allowed_codes: List[int]) -> str:
response = self._page.goto(url)
try:
response = self._page.goto(url)
except Exception as e:
if "Navigation interrupted by another one" in str(e):
# I believe redirect on the target page interfering with
# this thread's test.
time.sleep(.25)
response = self._page.goto(url)
assert response is not None
return_code = response.status
assert return_code in allowed_codes, "Invalid HTTP return code {}, allowed codes: {}".format(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def test_0030_generate_repository_dependencies_for_emboss_5(self):
def test_0035_generate_repository_dependencies_for_emboss_6(self):
"""Generate a repository_dependencies.xml file specifying emboss_datatypes and upload it to the emboss_6 repository."""
emboss_6_repository = self._get_repository_by_name_and_owner(emboss_6_repository_name, common.test_user_1_name)
assert emboss_6_repository, f"Failed to find repository for {common.test_user_1_name}/{emboss_6_repository_name}"
column_maker_repository = self._get_repository_by_name_and_owner(
column_maker_repository_name, common.test_user_1_name
)
Expand Down

0 comments on commit 886ac29

Please sign in to comment.