-
Notifications
You must be signed in to change notification settings - Fork 324
Description
Update
Unit tests on a system using UTC time as the default timezone. Some tests will fail starting at 03:30UTC and continuing through 04:59 UTC. A test at 03:29 UTC works and so does 05:00 UTC.
Also tests fail starting at 23:00 UTC through 23:59 UTC
Tested using the command:
$ faketime '2025-05-19 03:29:00' composer phpunit -- --no-progress # PASS
$ faketime '2025-05-19 03:30:00' composer phpunit -- --no-progress # FAIL
$ faketime '2025-05-19 04:59:00' composer phpunit -- --no-progress # FAIL
$ faketime '2025-05-19 05:00:00' composer phpunit -- --no-progress # PASS
Initial Report
I was doing some development work and all the unit tests were passing. Then all of a sudden I started getting some failures.
Tests run sometime before 03:45 UTC on 18-May-2025 were working. Sometime after 03:45 UTC on 18-May-2025 they started failing.
Job succeeded at "Sun May 18 03:18 AM UTC 2025"
https://github.com/LibreBooking/app/actions/runs/15091803623/job/42421317737
Same job failed when ran again at: "Sun May 18 04:19 AM UTC 2025"
Error output from: https://github.com/LibreBooking/app/actions/runs/15091803623/job/42422405571#step:7:62
There were 3 failures:
1) RetryOptionsTest::testRemovesConflictsFromReservation
Failed asserting that 6 matches expected 3.
/home/runner/work/app/app/tests/Application/Reservation/RetryOptionsTest.php:67
2) ResourceDisplayPresenterTest::testDisplaysAvailable
Failed asserting that false matches expected true.
/home/runner/work/app/app/tests/Presenters/ResourceDisplayPresenterTest.php:208
3) ResourceDisplayPresenterTest::testDisplaysUnavailable
Failed asserting that true matches expected false.
/home/runner/work/app/app/tests/Presenters/ResourceDisplayPresenterTest.php:229
FAILURES!
Tests: 1180, Assertions: 5005, Failures: 3, Warnings: 15, Deprecations: 56, Notices: 1, Skipped: 1.
Script ./vendor/bin/phpunit handling the phpunit event returned with error code 1
And then a test attempt at "Sun May 18 05:51:14 AM UTC 2025" all tests passed again.