| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The test forced a rollover by back-dating the file modification time, but the rollover time is now based also on the creation time, which cannot be changed. Instead, set the rollover time one second after the file creation time and wait until the clock reaches it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The test forced a rollover by back-dating the file modification time, but the rollover time is now based also on the creation time, which cannot be changed. Instead, set the rollover time one second after the file creation time and wait until the clock reaches it. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
The test test_rollover_at_midnight (and test_rollover_at_weekday) became unstable on Windows after gh-84649, which made TimedRotatingFileHandler base the rollover time on the minimum of the file creation and modification times. The test forced a rollover by back-dating the modification time, but the creation time cannot be changed, so the file no longer reliably looked old enough and the rollover did not happen.
Instead of moving the file's timestamps into the past, set the rollover time (atTime) one second after the file creation time and wait until the clock reaches it. This keeps the one-second offset that exercises the atTime rounding in computeRollover() while no longer depending on the ability to change the file times.