Layout Test webrtc/addICECandidate-closed.html is a flaky failure
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 May 2018 20:48:36 +0000 (20:48 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 May 2018 20:48:36 +0000 (20:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=185384

Reviewed by Eric Carlson.

Given that we are calling addIceCandidate and close the peer connection,
addIceCandidate might throw an error sometimes.
Catch the exception to make the test output stable.

* webrtc/addICECandidate-closed.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231453 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/webrtc/addICECandidate-closed.html

index 1a0838e..befec42 100644 (file)
@@ -1,3 +1,16 @@
+2018-05-07  Youenn Fablet  <youenn@apple.com>
+
+        Layout Test webrtc/addICECandidate-closed.html is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=185384
+
+        Reviewed by Eric Carlson.
+
+        Given that we are calling addIceCandidate and close the peer connection,
+        addIceCandidate might throw an error sometimes.
+        Catch the exception to make the test output stable.
+
+        * webrtc/addICECandidate-closed.html:
+
 2018-05-07  Chris Dumez  <cdumez@apple.com>
 
         ASSERT(!childItemWithTarget(child->target())) is hit in HistoryItem::addChildItem()
index 57dfd16..d4bfc77 100644 (file)
@@ -15,8 +15,10 @@ promise_test(async (test) => {
         const localTracks = stream.getTracks();
         [[sender, receiver], [receiver, sender]].forEach(([pc1, pc2]) => {
             pc1.onicecandidate = ({ candidate }) => {
-                if (candidate)
-                    pc2.addIceCandidate(candidate);
+                try {
+                    if (candidate)
+                        pc2.addIceCandidate(candidate);
+                } catch (e) { }
                 pc1.close();
             };
         });