Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbray committed Oct 12, 2021
1 parent 661b6f7 commit 4811cbd
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tests/test_cmd_serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def test_workflow_test_with_serve(self):
"""
Test testing a Galaxy workflow with the serve flag. Even though
this is technically using the test subcommand it is easier to test here
so we can use the UsesServeCommand methods
"""
cat = os.path.join(PROJECT_TEMPLATES_DIR, "demo", "cat.xml")
test_artifact = os.path.join(TEST_DATA_DIR, "wf2.ga")
Expand All @@ -189,16 +190,16 @@ def test_workflow_test_with_serve(self):
workflows = user_gi.workflows.get_workflows()
assert len(workflows) == 1
assert workflows[0]['name'] == 'TestWorkflow1'
histories = user_gi.histories.get_histories()
histories = user_gi.histories.get_histories(name="CWL Target History")
assert len(histories) == 1
for _ in range(60):
state_ids = user_gi.histories.show_history(histories[0]['id'])['state_ids']
if len(state_ids['ok']) == 3:
state_ids = [d['state'] for d in user_gi.histories.show_history(histories[0]['id'], contents=True)]
if len(state_ids) == 3 and set(state_ids) == {'ok', }:
break
time.sleep(5)
datasets = user_gi.histories.show_history(histories[0]['id'], contents=True)
assert len(datasets) == 3
assert all([d['state'] == 'ok' for d in datasets])
else:
time.sleep(10)
else:
raise Exception("Datasets did not reach an ok state within 10 minutes.")

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
def test_serve_profile(self):
Expand Down

0 comments on commit 4811cbd

Please sign in to comment.