Closed Bug 500640 Opened 11 years ago Closed 10 years ago

Random failure in test_lastModified.js

Categories

(Toolkit :: Places, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: mak, Assigned: mak)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 2 obsolete files)

TEST-UNEXPECTED-FAIL | e:/builds/moz2_slave/mozilla-central-win32-unittest-everythingelse/build/xpcshell/tests/test_places/unit/test_lastModified.js | 1246017574985000 != 1246017574985000 - See following stack:
JS frame :: e:\builds\moz2_slave\mozilla-central-win32-unittest-everythingelse\build\xpcshell\head.js :: do_throw :: line 181
JS frame :: e:\builds\moz2_slave\mozilla-central-win32-unittest-everythingelse\build\xpcshell\head.js :: do_check_neq :: line 197
JS frame :: e:/builds/moz2_slave/mozilla-central-win32-unittest-everythingelse/build/xpcshell/tests/test_places/unit/test_lastModified.js :: run_test :: line 56

this is due to the fact the now() we set in js ends up being equal to the now we got in the backend, due to Virtual Machine timing issues.
The fix is quite easy, change now with now+1
Blocks: 438871
Whiteboard: [orange]
Attached patch patch v1.0 (obsolete) — Splinter Review
Attachment #385795 - Flags: review?(adw)
Attached patch patch v1.1 (obsolete) — Splinter Review
Attachment #385795 - Attachment is obsolete: true
Attachment #386135 - Flags: review?(adw)
Attachment #385795 - Flags: review?(adw)
Comment on attachment 386135 [details] [diff] [review]
patch v1.1

>+  bs.setItemLastModified(itemId, dateAdded + 1);

Might be good to check bs.getItemLastModified(itemId) === dateAdded + 1 here.

r=adw
Attachment #386135 - Flags: review?(adw) → review+
Attached patch patch v1.2Splinter Review
Attachment #386135 - Attachment is obsolete: true
http://hg.mozilla.org/mozilla-central/rev/0ccb9530d509
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Whiteboard: [orange]
You need to log in before you can comment on or make changes to this bug.