Project story

AWS Labs: the test that aged while it waited

An audit slot could appear expired before the test that created it had even started.

What broke

In the Visual Asset Management System audit tests, a module-level timestamp was captured when pytest collected the file. If earlier tests took about 1,000 seconds, a slot intended to be valid could already look expired when the service checked the clock. Running the test by itself could hide the problem.

How I tested it

I ran the 11 TestAtomicCaps cases on their own, then ran the audit handler file from the backend directory with pytest and parallel execution disabled. All 119 tests in the file passed. I repeated the file-level run after reconciling the patch with the development branch.

What the maintainer merged

On November 24, 2026, scheurik merged a now() helper that reads the clock when each test constructs its timestamps and deadlines. The change was confined to the test setup and release notes. Production expiry handling stayed as it was.