Closed Bug 1092607 Opened 10 years ago Closed 9 years ago

Intermittent test_PlacesUtils_asyncGetBookmarkIds.js | test failed (with xpcshell return code: 0) | 1 == 2

Categories

(Toolkit :: Places, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox40 --- wontfix
firefox41 --- fixed
firefox42 --- fixed
firefox-esr38 --- wontfix

People

(Reporter: RyanVM, Assigned: mak)

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

20:11:55     INFO -  TEST-INFO | C:\slave\test\build\tests\xpcshell\tests\toolkit\components\places\tests\unit\test_PlacesUtils_asyncGetBookmarkIds.js | running test ...
20:11:55  WARNING -  TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\xpcshell\tests\toolkit\components\places\tests\unit\test_PlacesUtils_asyncGetBookmarkIds.js | test failed (with xpcshell return code: 0), see following log:
20:11:55     INFO -  >>>>>>>
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | test MAIN run_test pending (1)
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 0 pending (2)
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | test MAIN run_test finished (2)
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | running event loop
20:11:55     INFO -  TEST-INFO | C:/slave/test/build/tests/xpcshell/tests/toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js | Starting test_no_bookmark
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | test test_no_bookmark pending (2)
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 0 finished (2)
20:11:55     INFO -  TEST-PASS | C:/slave/test/build/tests/xpcshell/tests/toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js | [test_no_bookmark/< : 14] 0 == 0
20:11:55     INFO -  TEST-PASS | C:/slave/test/build/tests/xpcshell/tests/toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js | [test_no_bookmark/< : 15] "http://www.example.com/" == "http://www.example.com/"
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 1 pending (2)
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | test test_no_bookmark finished (2)
20:11:55     INFO -  TEST-INFO | C:/slave/test/build/tests/xpcshell/tests/toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js | Starting test_one_bookmark_nsIURI
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | test test_one_bookmark_nsIURI pending (2)
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 1 finished (2)
20:11:55     INFO -  TEST-PASS | C:/slave/test/build/tests/xpcshell/tests/toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js | [test_one_bookmark_nsIURI/< : 27] 1 == 1
20:11:55     INFO -  TEST-PASS | C:/slave/test/build/tests/xpcshell/tests/toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js | [test_one_bookmark_nsIURI/< : 28] 6 == 6
20:11:55     INFO -  TEST-PASS | C:/slave/test/build/tests/xpcshell/tests/toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js | [test_one_bookmark_nsIURI/< : 29] true == true
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 2 pending (2)
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | test test_one_bookmark_nsIURI finished (2)
20:11:55     INFO -  TEST-INFO | C:/slave/test/build/tests/xpcshell/tests/toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js | Starting test_one_bookmark_spec
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | test test_one_bookmark_spec pending (2)
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 2 finished (2)
20:11:55     INFO -  TEST-PASS | C:/slave/test/build/tests/xpcshell/tests/toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js | [test_one_bookmark_spec/< : 42] 1 == 1
20:11:55     INFO -  TEST-PASS | C:/slave/test/build/tests/xpcshell/tests/toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js | [test_one_bookmark_spec/< : 43] 6 == 6
20:11:55     INFO -  TEST-PASS | C:/slave/test/build/tests/xpcshell/tests/toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js | [test_one_bookmark_spec/< : 44] "http://www.example.com/" == "http://www.example.com/"
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 3 pending (2)
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | test test_one_bookmark_spec finished (2)
20:11:55     INFO -  TEST-INFO | C:/slave/test/build/tests/xpcshell/tests/toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js | Starting test_multiple_bookmarks
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | test test_multiple_bookmarks pending (2)
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | test run_next_test 3 finished (2)
20:11:55  WARNING -  TEST-UNEXPECTED-FAIL | C:/slave/test/build/tests/xpcshell/tests/toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js | 1 == 2 - See following stack:
20:11:55     INFO -      C:/slave/test/build/tests/xpcshell/tests/toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js:test_multiple_bookmarks/<:62
20:11:55     INFO -      resource://gre/modules/PlacesUtils.jsm:PU_asyncGetBookmarkIds/<:1335
20:11:55     INFO -      PU_asyncGetBookmarkIds@resource://gre/modules/PlacesUtils.jsm:1323:5
20:11:55     INFO -      test_multiple_bookmarks@C:/slave/test/build/tests/xpcshell/tests/toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js:61:5
20:11:55     INFO -      _run_next_test@C:\\slave\\test\\build\\tests\\xpcshell\\head.js:1315:11
20:11:55     INFO -      do_execute_soon/<.run@C:\\slave\\test\\build\\tests\\xpcshell\\head.js:570:9
20:11:55     INFO -      _do_main@C:\\slave\\test\\build\\tests\\xpcshell\\head.js:191:5
20:11:55     INFO -      _execute_test@C:\\slave\\test\\build\\tests\\xpcshell\\head.js:405:5
20:11:55     INFO -      @-e:1:1
20:11:55     INFO -  TEST-INFO | (xpcshell/head.js) | exiting test
20:11:55     INFO -  <<<<<<<
could be related to bug 1015629, indeed in the test, before calling asyncGetBookmarkIds, we should invoke promiseAsyncUpdates.

So basically:
1. convert the test to use add_task
2. yield promiseAsyncUpdates(); between any insertBookmark and a call to asyncGetBookmarkIds
Mentor: mak77
Whiteboard: [good first bug][lang=js]
Attached patch patch v1Splinter Review
ok, no reason to delay this further
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Attachment #8641258 - Flags: review?(ttaubert)
Mentor: mak77
Whiteboard: [good first bug][lang=js]
Comment on attachment 8641258 [details] [diff] [review]
patch v1

Review of attachment 8641258 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js
@@ +7,5 @@
> +let promiseAsyncGetBookmarkIds = Task.async(function* (url) {
> +  yield PlacesTestUtils.promiseAsyncUpdates();
> +  return new Promise(resolve => {
> +    PlacesUtils.asyncGetBookmarkIds(url, (itemIds, uri) => {
> +      dump(uri + "\n");

Was the dump() left here intentionally? If yes then maybe make an info() and add something a little more descriptive?
Attachment #8641258 - Flags: review?(ttaubert) → review+
oops, just a leftover from a previous version.
I stupidly did the usual "last minute change will break the test" thing.
backed out (https://hg.mozilla.org/integration/fx-team/rev/07e164fda53f) cause now I need a clobber...
https://hg.mozilla.org/mozilla-central/rev/15da891157bf
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: