Closed
Bug 1019323
Opened 11 years ago
Closed 10 years ago
Tests execution continues after calling unexpectedEventAndFinish()
Categories
(Core :: WebRTC, defect)
Core
WebRTC
Tracking
()
RESOLVED
FIXED
People
(Reporter: drno, Assigned: drno)
Details
Attachments
(2 files, 1 obsolete file)
6.81 KB,
patch
|
Details | Diff | Splinter Review | |
7.64 KB,
patch
|
jesup
:
review+
|
Details | Diff | Splinter Review |
unexpectedEventAndFinish() only results in a test error, but the test continues processing the test chain as if nothing happened.
Instead this should be treated as a fatal error and the test execution should be stopped.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → drno
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #8432920 -
Attachment is obsolete: true
Assignee | ||
Comment 3•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #8432954 -
Flags: review?(hskupin)
Assignee | ||
Updated•11 years ago
|
Attachment #8432955 -
Flags: review?(hskupin)
Comment 4•11 years ago
|
||
Comment on attachment 8432954 [details] [diff] [review]
bug_1019323_exit_test_after_unexpectedEventAndFinish.patch
Review of attachment 8432954 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with the mentioned unclear code clarified.
::: dom/media/tests/mochitest/pc.js
@@ +89,5 @@
> + // and shutdown the test
> + if ((typeof SimpleTest._alreadyFinished !== "undefined") &&
> + (SimpleTest._alreadyFinished == true)) {
> + self.finished = true;
> + }
I don't understand why we need that code here. If SimpleTest.finish() has been called, the code here won't be executed at all, or? I think it would be good to also request review from Ted here. I'm not that familiar with this specific behavior. Otherwise the patch looks fine.
Attachment #8432954 -
Flags: review?(hskupin) → review?(ted)
Comment 5•11 years ago
|
||
Comment on attachment 8432955 [details] [diff] [review]
bug_1019323_convert_ok_false.patch
Review of attachment 8432955 [details] [diff] [review]:
-----------------------------------------------------------------
I'm not familiar with all the latest additions to the webrtc tests and libs. I don't have the time to dig into this right now. So best is to ask Jesup for review.
Attachment #8432955 -
Flags: review?(hskupin) → review?(rjesup)
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Henrik Skupin (:whimboo) from comment #4)
> I don't understand why we need that code here. If SimpleTest.finish() has
> been called, the code here won't be executed at all, or? I think it would be
> good to also request review from Ted here. I'm not that familiar with this
> specific behavior. Otherwise the patch looks fine.
Unfortunately that is not the case. As long as there are still steps in the PeerConnectionWrapper.chain the test continuous until the chain is empty. This what this parts implements: ignore the rest of the chain if SimpleTest.finish() has been called, because that seems to be the common expectation of that function.
Updated•11 years ago
|
Attachment #8432955 -
Flags: review?(rjesup) → review+
Assignee | ||
Comment 7•11 years ago
|
||
Ted: since I wrote this patch I actually noticed that the problem of not exiting seems to exist on desktop/local builds. On TBPL SimpleTest.finish() seems to terminate the test case properly while it is running. Do you know any reason for that difference?
I have stuff depending on this: so could you please review or nominate someone else?
Flags: needinfo?(ted)
Comment 8•11 years ago
|
||
Comment on attachment 8432954 [details] [diff] [review]
bug_1019323_exit_test_after_unexpectedEventAndFinish.patch
Review of attachment 8432954 [details] [diff] [review]:
-----------------------------------------------------------------
The only thing I'm worried about here is that we might still have a little bit of a race between calling SimpleTest.finish(), the Mochitest harness moving on to the next test, and pc.js running "self.onFinished()".
Would it make sense to remove the calls to SimpleTest.finish(), and replace them with a CommandChain.finish() that set .finish(), and call SimpleTest.finish in one place, in an else block of the "if (!self.finished) {" in _executeNext?
Attachment #8432954 -
Flags: review?(ted)
Comment 9•11 years ago
|
||
(In reply to Nils Ohlmeier [:drno] from comment #7)
> Ted: since I wrote this patch I actually noticed that the problem of not
> exiting seems to exist on desktop/local builds. On TBPL SimpleTest.finish()
> seems to terminate the test case properly while it is running. Do you know
> any reason for that difference?
Are you running a single test, or a directory of tests? The Mochitest harness does different things in those cases.
Flags: needinfo?(ted)
Assignee | ||
Comment 10•10 years ago
|
||
This should be solved by the re-write with Promises which exit the test after any error.
Assignee | ||
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•