| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Create the log file in a fresh directory under a name which has never been used. On Windows, NTFS file tunneling restored the original creation time of a file recreated with the same name, which made the rollover time earlier than the current time and caused an unwanted rollover. Also check that the rollover does not happen before the specified time. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Oh wow, that's a surprising issue! Using a temporary directory sounds like a reasonable fix for this issue. Thanks for fixing it, it was failing randomly on CIs for a few weeks. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The test was still unstable on Windows after GH-151813.
TimedRotatingFileHandler bases the rollover time on int(min(creation_time, modification_time)). The test unlinked the file created in setUp() and recreated it under the same name, and on Windows NTFS file tunneling restores the original creation time in that case. The rollover time was therefore earlier than the current time, and the first records were unexpectedly rolled over. This pre-created the rotated file, so the real rollover hit the if os.path.exists(dfn): return check in doRollover() and the following records were not rolled over.
Creating the log file in a fresh directory under a name which has never been used avoids tunneling.
On a Windows 11 VM the current test fails 6 times out of 40 runs, the fixed test 0 out of 120.
The test now also checks that the rollover does not happen before the specified time.
🤖 Generated with Claude Code