Closed Bug 1859526 Opened 8 months ago Closed 6 months ago

Intermittent comm/mail/base/test/browser/browser_searchMessages.js | "Searching…" == "10 matches found"

Categories

(Thunderbird :: Mail Window Front End, defect, P5)

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1864776

People

(Reporter: intermittent-bug-filer, Unassigned)

References

(Regression)

Details

(Keywords: intermittent-failure, intermittent-testcase, regression)

Likely regressed by bug 1864776 because the status display won't change for 500 ms, so messages which occur in fast succession are dropped and break the test.

Fails consistently for me when I run the test. Tried dropping the delay time is several step from 500 down to 50 and it still fails most of the time.
When I revert the bug 1864776 change it passes consistently.

Keywords: regression
Regressed by: 1864776

The test needs to wait 500ms before this line:
https://searchfox.org/comm-central/rev/c4ffdd640dc85884005ee15fa5271404a01358d1/mail/base/test/browser/browser_searchMessages.js#142
Add await new Promise(resolve => setTimeout(resolve, 1000));

"No matches" found was just displayed here
https://searchfox.org/comm-central/rev/c4ffdd640dc85884005ee15fa5271404a01358d1/mail/base/test/browser/browser_searchMessages.js#122
so the next display will come 500ms later.

I did this before seeing comment 6 suggestion and it seems to fix it too. Not sure if it's cheating.

   // Search. 10 messages should be found.
   EventUtils.synthesizeMouseAtCenter(searchButton, {}, win);
   await TestUtils.waitForCondition(
     () => threadTree.view.rowCount == 10,
     "waiting for tree view to be filled"
   );
-  Assert.equal(statusText.value, "10 matches found");
+  setTimeout(() => {
+    Assert.equal(statusText.value, "10 matches found");
+  }, 700);   // 300 fails
 
   // Test tree sort column and direction.

This was opened over a month ago so maybe something in addition to patch for just landed bug 1864776 triggering the failure.
Anyhow, for bug 1864776 it is now fixed over there.

Still getting notification on this. Closing as a dupe. Hope that's OK.

Status: NEW → RESOLVED
Closed: 6 months ago
Duplicate of bug: 1864776
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.