DMSC Integration Testing

Last updated: November 02, 2025 03:23:45

Test: ingestor|bifrost|dataset_found_is_not_old|

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

instrument = 'bifrost', coda_proposal_id = '999999'

def test_dataset_found_is_not_old(
instrument: str,
coda_proposal_id: str,
) -> None:
ds = scicat.get_latest_coda_dataset(
instrument=instrument, proposal_id=coda_proposal_id
)
creation_time = cast(datetime, ds.creation_time)
> assert creation_time > datetime.now(creation_time.tzinfo) - timedelta(hours=24)
E assert datetime.datetime(2025, 10, 9, 10, 6, 50, 324000, tzinfo=tzutc()) > (datetime.datetime(2025, 10, 17, 8, 10, 20, 534364, tzinfo=tzutc()) - datetime.timedelta(days=1))
E + where datetime.datetime(2025, 10, 17, 8, 10, 20, 534364, tzinfo=tzutc()) = (tzutc())
E + where = datetime.now
E + and tzutc() = datetime.datetime(2025, 10, 9, 10, 6, 50, 324000, tzinfo=tzutc()).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)

tests/ingestor/ingestor_test.py:59: AssertionError

instrument = 'bifrost', coda_proposal_id = '999999'

def test_dataset_found_is_not_old(
instrument: str,
coda_proposal_id: str,
) -> None:
ds = scicat.get_latest_coda_dataset(
instrument=instrument, proposal_id=coda_proposal_id
)
creation_time = cast(datetime, ds.creation_time)
> assert creation_time > datetime.now(creation_time.tzinfo) - timedelta(hours=24)
E assert datetime.datetime(2025, 10, 9, 10, 6, 50, 324000, tzinfo=tzutc()) > (datetime.datetime(2025, 10, 16, 22, 15, 14, 254224, tzinfo=tzutc()) - datetime.timedelta(days=1))
E + where datetime.datetime(2025, 10, 16, 22, 15, 14, 254224, tzinfo=tzutc()) = (tzutc())
E + where = datetime.now
E + and tzutc() = datetime.datetime(2025, 10, 9, 10, 6, 50, 324000, tzinfo=tzutc()).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)

tests/ingestor/ingestor_test.py:59: AssertionError

instrument = 'bifrost', coda_proposal_id = '999999'

def test_dataset_found_is_not_old(
instrument: str,
coda_proposal_id: str,
) -> None:
ds = scicat.get_latest_coda_dataset(
instrument=instrument, proposal_id=coda_proposal_id
)
creation_time = cast(datetime, ds.creation_time)
> assert creation_time > datetime.now(creation_time.tzinfo) - timedelta(hours=24)
E assert datetime.datetime(2025, 10, 9, 10, 6, 50, 324000, tzinfo=tzutc()) > (datetime.datetime(2025, 10, 15, 22, 15, 28, 342126, tzinfo=tzutc()) - datetime.timedelta(days=1))
E + where datetime.datetime(2025, 10, 15, 22, 15, 28, 342126, tzinfo=tzutc()) = (tzutc())
E + where = datetime.now
E + and tzutc() = datetime.datetime(2025, 10, 9, 10, 6, 50, 324000, tzinfo=tzutc()).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)

tests/ingestor/ingestor_test.py:59: AssertionError

instrument = 'bifrost', coda_proposal_id = '999999'

def test_dataset_found_is_not_old(
instrument: str,
coda_proposal_id: str,
) -> None:
ds = scicat.get_latest_coda_dataset(
instrument=instrument, proposal_id=coda_proposal_id
)
creation_time = cast(datetime, ds.creation_time)
> assert creation_time > datetime.now(creation_time.tzinfo) - timedelta(hours=24)
E assert datetime.datetime(2025, 10, 9, 10, 6, 50, 324000, tzinfo=tzutc()) > (datetime.datetime(2025, 10, 14, 22, 14, 44, 732883, tzinfo=tzutc()) - datetime.timedelta(days=1))
E + where datetime.datetime(2025, 10, 14, 22, 14, 44, 732883, tzinfo=tzutc()) = (tzutc())
E + where = datetime.now
E + and tzutc() = datetime.datetime(2025, 10, 9, 10, 6, 50, 324000, tzinfo=tzutc()).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)

tests/ingestor/ingestor_test.py:59: AssertionError

instrument = 'bifrost', coda_proposal_id = '999999'

def test_dataset_found_is_not_old(
instrument: str,
coda_proposal_id: str,
) -> None:
ds = scicat.get_latest_coda_dataset(
instrument=instrument, proposal_id=coda_proposal_id
)
creation_time = cast(datetime, ds.creation_time)
> assert creation_time > datetime.now(creation_time.tzinfo) - timedelta(hours=24)
E assert datetime.datetime(2025, 10, 9, 10, 6, 50, 324000, tzinfo=tzutc()) > (datetime.datetime(2025, 10, 13, 22, 14, 55, 16512, tzinfo=tzutc()) - datetime.timedelta(days=1))
E + where datetime.datetime(2025, 10, 13, 22, 14, 55, 16512, tzinfo=tzutc()) = (tzutc())
E + where = datetime.now
E + and tzutc() = datetime.datetime(2025, 10, 9, 10, 6, 50, 324000, tzinfo=tzutc()).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)

tests/ingestor/ingestor_test.py:59: AssertionError

instrument = 'bifrost', coda_proposal_id = '999999'

def test_dataset_found_is_not_old(
instrument: str,
coda_proposal_id: str,
) -> None:
ds = scicat.get_latest_coda_dataset(
instrument=instrument, proposal_id=coda_proposal_id
)
creation_time = cast(datetime, ds.creation_time)
> assert creation_time > datetime.now(creation_time.tzinfo) - timedelta(hours=24)
E assert datetime.datetime(2025, 10, 9, 10, 6, 50, 324000, tzinfo=tzutc()) > (datetime.datetime(2025, 10, 13, 10, 14, 59, 629783, tzinfo=tzutc()) - datetime.timedelta(days=1))
E + where datetime.datetime(2025, 10, 13, 10, 14, 59, 629783, tzinfo=tzutc()) = (tzutc())
E + where = datetime.now
E + and tzutc() = datetime.datetime(2025, 10, 9, 10, 6, 50, 324000, tzinfo=tzutc()).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)

tests/ingestor/ingestor_test.py:59: AssertionError

instrument = 'bifrost', coda_proposal_id = '999999'

def test_dataset_found_is_not_old(
instrument: str,
coda_proposal_id: str,
) -> None:
ds = scicat.get_latest_coda_dataset(
instrument=instrument, proposal_id=coda_proposal_id
)
creation_time = cast(datetime, ds.creation_time)
> assert creation_time > datetime.now(creation_time.tzinfo) - timedelta(hours=24)
E assert datetime.datetime(2025, 10, 9, 10, 6, 50, 324000, tzinfo=tzutc()) > (datetime.datetime(2025, 10, 13, 8, 46, 23, 154926, tzinfo=tzutc()) - datetime.timedelta(days=1))
E + where datetime.datetime(2025, 10, 13, 8, 46, 23, 154926, tzinfo=tzutc()) = (tzutc())
E + where = datetime.now
E + and tzutc() = datetime.datetime(2025, 10, 9, 10, 6, 50, 324000, tzinfo=tzutc()).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)

tests/ingestor/ingestor_test.py:59: AssertionError

instrument = 'bifrost', coda_proposal_id = '999999'

def test_dataset_found_is_not_old(
instrument: str,
coda_proposal_id: str,
) -> None:
ds = scicat.get_latest_coda_dataset(
instrument=instrument, proposal_id=coda_proposal_id
)
creation_time = cast(datetime, ds.creation_time)
> assert creation_time > datetime.now(creation_time.tzinfo) - timedelta(hours=24)
E assert datetime.datetime(2025, 10, 9, 10, 6, 50, 324000, tzinfo=tzutc()) > (datetime.datetime(2025, 10, 13, 7, 57, 13, 740090, tzinfo=tzutc()) - datetime.timedelta(days=1))
E + where datetime.datetime(2025, 10, 13, 7, 57, 13, 740090, tzinfo=tzutc()) = (tzutc())
E + where = datetime.now
E + and tzutc() = datetime.datetime(2025, 10, 9, 10, 6, 50, 324000, tzinfo=tzutc()).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)

tests/ingestor/ingestor_test.py:59: AssertionError

None

None

None

None

None

None

None

None

None

None

instrument = 'bifrost', coda_proposal_id = '999999'

def test_dataset_found_is_not_old(
instrument: str,
coda_proposal_id: str,
) -> None:
> ds = scicat.get_latest_coda_dataset(
instrument=instrument, proposal_id=coda_proposal_id
)

tests/ingestor/ingestor_test.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/ingestor/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/scicat.py:66: in get_latest_coda_dataset
ds_model = _get_latest_dataset_model(client, instrument, proposal_id)
.tox/ingestor/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/scicat.py:22: in _get_latest_dataset_model
datasets = client.scicat.query_datasets(
.tox/ingestor/lib/python3.12/site-packages/scitacean/client.py:839: in query_datasets
dsets_json = self._call_endpoint(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =

def _call_endpoint(
self,
*,
cmd: str,
url: str,
operation: str,
data: model.BaseModel | None = None,
params: dict[str, str] | None = None,
) -> Any:
full_url = _url_concat(self._base_url, url)
logger = get_logger()
logger.info("Calling SciCat API at %s for operation '%s'", full_url, operation)

response = self._send_to_scicat(cmd=cmd, url=full_url, data=data, params=params)
if not response.is_success:
logger.error(
"SciCat API call to %s failed: %s %s: %s",
full_url,
response.status_code,
response.reason_phrase,
response.text,
)
> raise ScicatCommError(
f"Error in operation '{operation}': {response.status_code} "
f"{response.reason_phrase}: {response.text}"
)
E scitacean.error.ScicatCommError: Error in operation 'query_datasets': 503 Service Temporarily Unavailable:
E 503 Service Temporarily Unavailable
E
E

503 Service Temporarily Unavailable


E
nginx

E
E

.tox/ingestor/lib/python3.12/site-packages/scitacean/client.py:1219: ScicatCommError

None