Closed Bug 987275 Opened 10 years ago Closed 10 years ago

Make test_deleted_items more resistant against timing issues

Categories

(Calendar :: Internal Components, defect)

Lightning 2.6
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Fallen, Assigned: Fallen)

References

Details

Attachments

(2 files, 1 obsolete file)

The test randomly fails on windows. The use of timeouts is a bad thing. I'm introducing an internal handler for the sql calls that we can use from the tests.
Attached patch Fix - v1 (obsolete) β€” β€” Splinter Review
Attachment #8395813 - Flags: review?(mohit.kanwal)
Comment on attachment 8395813 [details] [diff] [review]
Fix - v1

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

LGTM, just a few nits. Tested out the patch. Works fine.

::: calendar/test/unit/test_deleted_items.js
@@ +41,3 @@
>      do_check_null(delmgr.getDeletedDate("random", "random"));
>  
>      // This shouldn't throw anything

I think a more informative comment is required.

@@ +51,4 @@
>      item.startDate = cal.now();
>      item.endDate = cal.now();
>  
> +    // Add the item, it still shouldn't be in the deleted database

checkstyle: missing full stop.
Attachment #8395813 - Flags: review?(mohit.kanwal) → review+
Attached patch Fix - v2 β€” β€” Splinter Review
Patch for checkin
Attachment #8395813 - Attachment is obsolete: true
Attachment #8399098 - Flags: review+
https://hg.mozilla.org/comm-central/rev/8fb24ee695c2
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 3.3
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I made a mistake that causes intermittent test failures, executing this test in loop fails 1 out of 10 times. There are also errors on the build where bug 680203 was checked in.

This simple change fixes it, I had it running 20 minutes on loop without failure.
Attachment #8409616 - Flags: review?(mohit.kanwal)
Comment on attachment 8409616 [details] [diff] [review]
Fix intermittent failures - v1

Using yield with a promise should work as expected, r=mschroeder.
Attachment #8409616 - Flags: review?(mohit.kanwal) → review+
Pushed to comm-central changeset 6fc71637650a
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: