Race condition in sut timeout test

RESOLVED FIXED

Status

Testing
Mozbase
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: wlach, Assigned: wlach)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

We are sleeping and then timing out in the mock agent, which could cause a race in the test between the timeout and the agent closing its socket.

This is causing the intermittent orange in bug 790765.
Created attachment 756145 [details] [diff] [review]
Patch to fix issue

This makes sure we keep on sleeping until the test is finished. Should fix the issue.
Assignee: nobody → wlachance
Attachment #756145 - Flags: review?(jhammel)
Blocks: 790765

Comment 2

5 years ago
Comment on attachment 756145 [details] [diff] [review]
Patch to fix issue

nice, but I would highly desire a hard counter or max timeout instead of a while loop that in theory will never be terminated if if self.should_stop is never True.

It looks like that sut_basic.BasicTest is the only problem child observed so far.....so hopefully this suffices.  I'll (very) gladly r+ if reposted with some termination condition on the while loop
Attachment #756145 - Flags: review?(jhammel) → review-
Created attachment 756210 [details] [diff] [review]
Add timeout + throw exception if reached
Attachment #756145 - Attachment is obsolete: true
Attachment #756210 - Flags: review?(jhammel)

Comment 4

5 years ago
Comment on attachment 756210 [details] [diff] [review]
Add timeout + throw exception if reached

looks great! thanks!
Attachment #756210 - Flags: review?(jhammel) → review+

Comment 5

5 years ago
going to go ahead and check this in, unless there are any objections

Updated

5 years ago
Blocks: 877733

Comment 6

5 years ago
pushed: https://github.com/mozilla/mozbase/commit/cf5fcfd715072c5a1142da7093da7a3c9866e150

mirroring noted at bug 877733
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.