Flaky UT Fix - #380
Merged
Merged
Conversation
yashnap
requested review from
Mike Richmond (mirichmo) and
Rajasi Rane (rane-rajasi)
as code owners
August 13, 2026 14:45
github-actions
Bot
requested review from
GAURAVRAMRAKHYANI,
SathishMSFT,
Michelle McDaniel (michellemcdaniel) and
nikhim-um
August 13, 2026 14:45
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts a unit test timing delay intended to reduce flakiness when asserting that a status file’s mtime changes after an update.
Changes:
- Increased
time.sleep()intest_update_filefrom0.03to0.08seconds to try to exceed filesystem mtime granularity.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #380 +/- ##
==========================================
- Coverage 94.87% 94.87% -0.01%
==========================================
Files 111 111
Lines 20855 20844 -11
==========================================
- Hits 19787 19776 -11
Misses 1068 1068
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-authored-by: yashnap <267671466+yashnap@users.noreply.github.com>
Koshy John (kjohn-msft)
left a comment
Collaborator
There was a problem hiding this comment.
Comment inline
7 tasks
Koshy John (kjohn-msft)
approved these changes
Aug 20, 2026
Michelle McDaniel (michellemcdaniel)
approved these changes
Aug 20, 2026
Rajasi Rane (rane-rajasi)
approved these changes
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DESCRIPTION BY COPILOT AGENT:
The issue I fixed was a flaky unit test (test_update_file) that depended on:
sleep() timing, and file mtime comparisons.
On some CI filesystems, timestamp granularity is coarse (e.g., 1 second), so the file modification time didn’t always change as expected, causing intermittent failures even when behavior was correct.
I changed the test to be deterministic by validating status file content instead:
Confirm update_file("test1") does not change test.status.
Confirm update_file(file_name) updates test.status content as expected.
Description update
Reworked test_update_file in Test_ExtOutputStatusHandler.py to remove timing/mtime-based assertions that caused CI flakiness due to filesystem timestamp granularity.
The test now validates behavior using status-file content comparisons, ensuring deterministic verification that:
updating a different sequence number does not affect the original status file, and
updating the target sequence number correctly updates status payload fields.