Layout Test http/tests/inspector/network/beacon-type.html is flaky.
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Oct 2017 21:10:24 +0000 (21:10 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Oct 2017 21:10:24 +0000 (21:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=177834

Unreviewed test gardening.

* http/tests/inspector/network/beacon-type.html:
* http/tests/inspector/network/ping-type.html:
Don't wait for the resource to finish loading if it has already finished loading.
Logs showed the resource had already finished loading earlier, before this
promise microtask started running.

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

LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/network/beacon-type.html
LayoutTests/http/tests/inspector/network/ping-type.html

index adcce09..09cb543 100644 (file)
@@ -1,3 +1,16 @@
+2017-10-03  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Layout Test http/tests/inspector/network/beacon-type.html is flaky.
+        https://bugs.webkit.org/show_bug.cgi?id=177834
+
+        Unreviewed test gardening.
+
+        * http/tests/inspector/network/beacon-type.html:
+        * http/tests/inspector/network/ping-type.html:
+        Don't wait for the resource to finish loading if it has already finished loading.
+        Logs showed the resource had already finished loading earlier, before this
+        promise microtask started running.
+
 2017-10-03  Daniel Bates  <dabates@apple.com>
 
         XMLHttpRequest.setRequestHeader() should allow Content-Transfer-Encoding header; remove
index d535095..4a56f5f 100644 (file)
@@ -20,10 +20,6 @@ function triggerBeaconWithData() {
 
 function test()
 {
-    // FIXME: <https://webkit.org/b/177834> Layout Test http/tests/inspector/network/beacon-type.html is flaky.
-    // Adding debugging to try to determine why this test is timing out.    
-    InspectorTest.debug();
-
     let suite = InspectorTest.createAsyncSuite("Resource.Type.Beacon");
 
     function addTestCase({name, description, expression, resourceHandler}) {
@@ -36,10 +32,12 @@ function test()
                     .then((event) => {
                         resource = event.data.resource;
                         alwaysTest(resource);
-                        return Promise.race([
-                            resource.awaitEvent(WI.Resource.Event.LoadingDidFinish),
-                            resource.awaitEvent(WI.Resource.Event.LoadingDidFail),
-                        ]);
+                        if (resource.isLoading()) {
+                            return Promise.race([
+                                resource.awaitEvent(WI.Resource.Event.LoadingDidFinish),
+                                resource.awaitEvent(WI.Resource.Event.LoadingDidFail),
+                            ]);
+                        }
                     })
                     .then(() => { resourceHandler(resource); })
                     .then(resolve, reject);
index e126ac7..15d7df2 100644 (file)
@@ -44,10 +44,12 @@ function test()
                     .then((event) => {
                         resource = event.data.resource;
                         alwaysTest(resource);
-                        return Promise.race([
-                            resource.awaitEvent(WI.Resource.Event.LoadingDidFinish),
-                            resource.awaitEvent(WI.Resource.Event.LoadingDidFail),
-                        ]);
+                        if (resource.isLoading()) {
+                            return Promise.race([
+                                resource.awaitEvent(WI.Resource.Event.LoadingDidFinish),
+                                resource.awaitEvent(WI.Resource.Event.LoadingDidFail),
+                            ]);
+                        }
                     })
                     .then(() => { resourceHandler(resource); })
                     .then(resolve, reject);