Closed Bug 1279726 Opened 8 years ago Closed 8 years ago

TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\downloads\test-about-downloads.js

Categories

(Thunderbird :: Testing Infrastructure, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 52.0

People

(Reporter: jorgk-bmo, Assigned: aceman)

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 1 obsolete file)

First seen 2016-06-11:

TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\downloads\test-about-downloads.js | test-about-downloads.js::test_clear_all_files

https://treeherder.mozilla.org/#/jobs?repo=comm-central&selectedJob=39596

http://archive.mozilla.org/pub/thunderbird/tinderbox-builds/comm-central-win32-debug/1465663765/comm-central_win7_ix-debug_test-mozmill-bm109-tests1-windows-build7.txt.gz

SUMMARY-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\downloads\test-about-downloads.js | test-about-downloads.js::test_clear_all_files
    EXCEPTION: Timeout waiting for clearing all saved attachment files.
      at: utils.js line 447
         TimeoutError utils.js:447 13
         waitFor utils.js:485 11
         MozMillController.prototype.waitFor controller.js:687 3
         test_clear_all_files test-about-downloads.js:271 3
         Runner.prototype.wrapper frame.js:585 9
         Runner.prototype._runTestModule frame.js:655 9
         Runner.prototype.runTestModule frame.js:701 3
         Runner.prototype.runTestDirectory frame.js:525 7
         runTestDirectory frame.js:707 3
         Bridge.prototype._execFunction server.js:179 10
         Bridge.prototype.execFunction server.js:183 16
         Session.prototype.receive server.js:283 3
         AsyncRead.prototype.onDataAvailable server.js:88 3
I think this was seen long ago, but maybe on linux (before the big bustage).

The test probably has to wait for something again.
Well, we get this failure very frequently now, check for example:
https://treeherder.mozilla.org/#/jobs?repo=comm-central&revision=35368039b787ac417dbe605ad5a3287d6c89cd60
I ran mozmake SOLO_TEST=downloads/test-about-downloads.js mozmill-one on my local debug build and could reproduce the problem:

SUMMARY-UNEXPECTED-FAIL | c:\mozilla-source\comm-central\mail\test\mozmill\downloads\test-about-downloads.js | test-about-downloads.js::test_clear_all_files
  EXCEPTION: Timeout waiting for clearing all saved attachment files.
    at: utils.js line 447
       TimeoutError utils.js:447 13
       waitFor utils.js:485 11
       MozMillController.prototype.waitFor controller.js:687 3
       test_clear_all_files test-about-downloads.js:271 3
       Runner.prototype.wrapper frame.js:585 9
       Runner.prototype._runTestModule frame.js:655 9
       Runner.prototype.runTestModule frame.js:701 3
       Runner.prototype.runTestFile frame.js:534 3
       runTestFile frame.js:713 3
       Bridge.prototype._execFunction server.js:179 10
       Bridge.prototype.execFunction server.js:183 16
       Session.prototype.receive server.js:283 3
       AsyncRead.prototype.onDataAvailable server.js:88 3

test-about-downloads.js:271 reads:

  mc.waitFor(() => downloadsView.count == 0,
             "Timeout waiting for clearing all saved attachment files.");

I clicked the "Clear List" button while the test was running, and the test succeeded. Selecting "Clear List" from the context menu manually had the same effect.
I took at look at Aceman's debug run:

https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=9b23a376fe3047a79a72af00a3b33f9c602efff6

https://hg.mozilla.org/try-comm-central/rev/65b259b8790d1d4361b1393624bfd600ba7ef1e9#l1.12

Debug shows:
ACE: menustate=closed
ACE: No. downloads=1

So after clicking in the context menu, it closed but the downloads didn't clear. Nice :-(
Instead of the mc.sleep(500); this also works locally:

  mc.window.setTimeout(function() {
  mc.click_menus_in_sequence(contextMenu, [
                               { command: "msgDownloadsCmd_clearDownloads" }
                             ]);
  }, 500);
(In reply to Jorg K (GMT+2) from comment #4)
> Created attachment 8797569 [details] [diff] [review]
> 1279726.patch
> Try here:
> https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=f95bc25d489ebf394dadc530f5223ad9f648a47f

I can't say that the try is green, but at least this test didn't fail ;-)
Yes, that's what I understood Kent wants us to do:
https://hg.mozilla.org/try-comm-central/rev/9d526c906eb8b024ad60784a2d0cc4b00e98837e#l2.33

Thanks! Nice work, one test less that fails unexpectedly.
Attached patch 1279726.patchSplinter Review
Attaching Aceman's excellent work ;-)

Try run to be seen in bug 1307516 comment #14.
Attachment #8797569 - Attachment is obsolete: true
Attachment #8797569 - Flags: feedback?(acelists)
Attachment #8797966 - Flags: review+
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Thanks for cleaning up the patch. It was more rkent's great work.
What do we need to do here?
Component: General → Testing Infrastructure
Land it. If you want I can change the commit message to:
Bug 1279726 - Fix waitForFinish() to use same async paradigm as Mozmill on suggestion of R James Kent. Other clean-up. r=jorgk
I would write:
Bug 1279726 - Fix waitForFinish() in test-about-downloads.js to wait on Promise completion as suggested by R James Kent. Other clean-up. r=jorgk

So please prepare the message and I mark the other patches for landing. Thanks
https://hg.mozilla.org/comm-central/rev/4f5fd1fc0bbaac8fcdd561c0348cbfb102196e7e
I snuck in a comment to tell people how to run the test ;-)
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 52.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: