Skip to content

chore: Improve reliability of test.cli.run-target-chromium.js - #3955

Open
Rob--W wants to merge 2 commits into
mozilla:masterfrom
Rob--W:pr3954-followup
Open

Rob--W wants to merge 2 commits into
mozilla:masterfrom
Rob--W:pr3954-followup

Conversation

@Rob--W

@Rob--W Rob--W commented Nov 27, 2026

Copy link
Copy Markdown
Member

This is a follow-up to PR #3954; basically a revert of that PR plus a new commit that aims to fix the intermittent issue more reliably.

I left some quick review comments at #3954 (review) at first based on my intuition, but now I have also confirmed the two issues with that PR:

  • Although the retry loop addresses the intermittent test failure from the initial-scan race, it changes what the test verifies, from "a change triggers a reload" to "repeated changes eventually trigger a reload".
  • The repeated writes can be a new source of intermittent test failures: if the reload for the first write is still pending but not detected yet, another write can be issues which could result in 3 instead of 2 reloads to be detected - causing a test failure.

The proposed fix (second commit) fixes the issue and adds a comment to explain why the test is like this, referencing #3954 (which itself references #3950 eventually - as the original motivation for #3954, i.e. detecting too little) and #3697 (the opposite problem: detecting too much).

… prevent frequent intermittent failures. (mozilla#3954)"

This reverts commit 3068875.

Although the retry loop addresses the intermittent test failure from the
initial-scan race, it changes what the test verifies, from "a change
triggers a reload" to "repeated changes eventually trigger a reload".

Additionally, the repeated writes can be a new source of intermittent
test failures: if the reload for the first write is still pending but
not detected yet, another write can be issues which could result in
3 instead of 2 reloads to be detected - causing a test failure.
@Rob--W
Rob--W requested a review from rpl November 27, 2026 18:23

// Wait before touching the file:
// - Changes made before the watcher's initial async scan completes are
// never reported (see #3954 and #3950). The wait below is expected to

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept the start of this comment the same as @rpl's comment at #3954. "never reported" is technically not fully accurate as a statement in isolation (it should be "may not be reported"), but in the context here it describes the condition for which the delay is needed. Let me know if I should reword (I kept the same start because it was the justification for the original commit/PR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant