@@ -169,6 +169,7 @@ def test_workflow_test_with_serve(self):
169
169
"""
170
170
Test testing a Galaxy workflow with the serve flag. Even though
171
171
this is technically using the test subcommand it is easier to test here
172
+ so we can use the UsesServeCommand methods
172
173
"""
173
174
cat = os .path .join (PROJECT_TEMPLATES_DIR , "demo" , "cat.xml" )
174
175
test_artifact = os .path .join (TEST_DATA_DIR , "wf2.ga" )
@@ -189,16 +190,16 @@ def test_workflow_test_with_serve(self):
189
190
workflows = user_gi .workflows .get_workflows ()
190
191
assert len (workflows ) == 1
191
192
assert workflows [0 ]['name' ] == 'TestWorkflow1'
192
- histories = user_gi .histories .get_histories ()
193
+ histories = user_gi .histories .get_histories (name = "CWL Target History" )
193
194
assert len (histories ) == 1
194
195
for _ in range (60 ):
195
- state_ids = user_gi .histories .show_history (histories [0 ]['id' ])[ 'state_ids' ]
196
- if len (state_ids [ 'ok' ] ) == 3 :
196
+ state_ids = [ d [ 'state' ] for d in user_gi .histories .show_history (histories [0 ]['id' ], contents = True ) ]
197
+ if len (state_ids ) == 3 and set ( state_ids ) == { 'ok' , } :
197
198
break
198
- time . sleep ( 5 )
199
- datasets = user_gi . histories . show_history ( histories [ 0 ][ 'id' ], contents = True )
200
- assert len ( datasets ) == 3
201
- assert all ([ d [ 'state' ] == 'ok' for d in datasets ] )
199
+ else :
200
+ time . sleep ( 10 )
201
+ else :
202
+ raise Exception ( "Datasets did not reach an ok state within 10 minutes." )
202
203
203
204
@skip_if_environ ("PLANEMO_SKIP_GALAXY_TESTS" )
204
205
def test_serve_profile (self ):
0 commit comments