diff --git a/tests/test_autoreducer_memory_limit.py b/tests/test_autoreducer_memory_limit.py index 2bb84ede..0fe334d3 100644 --- a/tests/test_autoreducer_memory_limit.py +++ b/tests/test_autoreducer_memory_limit.py @@ -26,7 +26,7 @@ def test_reduction_script_exceeds_memory_limit(self, db_connection, request_page assert response.url.endswith("/report/pg3/54321/") # wait for job to be terminated and database to get updated - time.sleep(3.0) + time.sleep(5.0) assert db_utils.check_run_status_exist(db_connection, run_id, "REDUCTION.REQUEST") assert db_utils.check_run_status_exist(db_connection, run_id, "REDUCTION.STARTED") diff --git a/tests/utils/db_utils.py b/tests/utils/db_utils.py index 1dc80e86..32cd1af6 100644 --- a/tests/utils/db_utils.py +++ b/tests/utils/db_utils.py @@ -71,7 +71,7 @@ def add_instrument_data_run(conn, instrument, ipts, run_number, facility="SNS"): :param psycopg2.Connection conn: database connection :param str instrument: instrument - :param str ipts: IPTS number + :param str ipts: IPTS identifier, e.g. "IPTS-1234" :param int run_number: run number :param str facility: facility (SNS or HFIR) :return: int, ID of the run in table datarun @@ -111,7 +111,7 @@ def add_instrument_data_run(conn, instrument, ipts, run_number, facility="SNS"): run_number, ipts_id[0], inst_id[0], - f"/{facility}/{instrument}/IPTS-{ipts}/nexus/{instrument}_{run_number}.nxs.h5", + f"/{facility}/{instrument.upper()}/{ipts}/nexus/{instrument.upper()}_{run_number}.nxs.h5", "2020-05-20 13:02:52.281964;", ), )