@@ -446,6 +446,10 @@ def test_complete_type(self):
446
446
qdb .artifact .Artifact (exp_artifact_count ).filepaths ])
447
447
448
448
def test_complete_success (self ):
449
+ # Note that here we are submitting and creating other multiple jobs;
450
+ # thus here is the best place to test any intermediary steps/functions
451
+ # of the job creation, submission, exectution, and completion.
452
+ #
449
453
# This first part of the test is just to test that by default the
450
454
# naming of the output artifact will be the name of the output
451
455
fd , fp = mkstemp (suffix = '_table.biom' )
@@ -457,8 +461,16 @@ def test_complete_success(self):
457
461
'artifact_type' : 'BIOM' }}
458
462
job = _create_job ()
459
463
job ._set_status ('running' )
464
+
465
+ # here we can test that job.release_validator_job hasn't been created
466
+ # yet so it has to be None
467
+ self .assertIsNone (job .release_validator_job )
460
468
job .complete (True , artifacts_data = artifacts_data )
461
469
self ._wait_for_job (job )
470
+ # let's check for the job that released the validators
471
+ self .assertIsNotNone (job .release_validator_job )
472
+ self .assertEqual (job .release_validator_job .parameters .values ['job' ],
473
+ job .id )
462
474
# Retrieve the job that is performing the validation:
463
475
validators = list (job .validator_jobs )
464
476
self .assertEqual (len (validators ), 1 )
@@ -858,8 +870,9 @@ def test_raise_if_not_in_construction_error(self):
858
870
tester ._raise_if_not_in_construction ()
859
871
860
872
def test_submit (self ):
861
- # In order to test a success, we need to actually run the jobs, which
862
- # will mean to run split libraries, for example.
873
+ # The submit method is being tested in test_complete_success via
874
+ # a job, its release validators and validators submissions.
875
+ # Leaving this note here in case it's helpful for future development
863
876
pass
864
877
865
878
def test_from_default_workflow (self ):
0 commit comments