Skip to content

Commit

Permalink
Merge pull request #7340 from nsoranzo/fix_test_import_metadata_regen…
Browse files Browse the repository at this point in the history
…eration

Fix ``test_import_metadata_regeneration`` API test
  • Loading branch information
jmchilton committed Feb 9, 2019
2 parents 572e91a + 12789f4 commit b227d12
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/api/test_histories.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-
import time

from requests import (
get,
post,
Expand Down Expand Up @@ -199,6 +201,14 @@ def test_import_metadata_regeneration(self):
history_id=imported_history_id,
hid=1,
)
# The cleanup() method of the __IMPORT_HISTORY__ job (which is executed
# after the job has entered its final state):
# - creates a new dataset with 'ok' state and adds it to the history
# - starts a __SET_METADATA__ job to regerenate the dataset metadata, if
# needed
# We need to wait a bit for the creation of the __SET_METADATA__ job.
time.sleep(1)
self.dataset_populator.wait_for_history_jobs(imported_history_id, assert_ok=True)
bai_metadata = import_bam_metadata["meta_files"][0]
assert bai_metadata["file_type"] == "bam_index"
api_url = bai_metadata["download_url"].split("api/", 1)[1]
Expand Down

0 comments on commit b227d12

Please sign in to comment.