Bug 1452034 [wpt PR 10342] - Fix RTCPeerConnection-track-stats.https.html flake., a=testonly
authorHenrik Boström <hbos@chromium.org>
Mon, 09 Apr 2018 22:24:48 +0000
changeset 413780 412d812b4e67829a16d27879aa3177eae4e4a998
parent 413779 17a3cc47b2136ca7d7896b97f7f9fa7627214c74
child 413781 544a05e734c21c9528ce99a92b9c065f45971d2f
push id33850
push userapavel@mozilla.com
push dateMon, 16 Apr 2018 09:53:48 +0000
treeherdermozilla-central@6276ec7ebbf3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1452034, 10342, 829401, 999477, 548721
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1452034 [wpt PR 10342] - Fix RTCPeerConnection-track-stats.https.html flake., a=testonly Automatic update from web-platform-testsFix RTCPeerConnection-track-stats.https.html flake. The assert_object_equals would fail due to timestamps being different in rare runs where the getStats() cache was invalidated between the two calls. external/wpt/webrtc should make no assumptions about any cache. Tests are updated only to compare stats IDs, not individual metrics. Bug: 829401 Change-Id: I6fcc781a1827af69f47a5c4416dd5e6bae0c98b3 Reviewed-on: https://chromium-review.googlesource.com/999477 Reviewed-by: Harald Alvestrand <hta@chromium.org> Commit-Queue: Henrik Boström <hbos@chromium.org> Cr-Commit-Position: refs/heads/master@{#548721} wpt-commits: 603e2776a1663e0790db8887204d22547ddc90de wpt-pr: 10342 wpt-commits: 603e2776a1663e0790db8887204d22547ddc90de wpt-pr: 10342
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/webrtc/RTCPeerConnection-track-stats.https.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -605799,17 +605799,17 @@
    "16fe3b155e55d1b66181788c93e570b36e5cc67d",
    "testharness"
   ],
   "webrtc/RTCPeerConnection-setRemoteDescription.html": [
    "2a2e3f9ff0a5912fa260d7124f7f5a9c3862c533",
    "testharness"
   ],
   "webrtc/RTCPeerConnection-track-stats.https.html": [
-   "512e40d1b6f95c86b90ba7b536b6ae049f6a04c0",
+   "71d7a85e16504ba67a718c2d50526b7d9f8fd4d0",
    "testharness"
   ],
   "webrtc/RTCPeerConnectionIceEvent-constructor.html": [
    "f273bd7fdfc883a15e8fb16fef5309061254c6cc",
    "testharness"
   ],
   "webrtc/RTCRtpCapabilities-helper.js": [
    "22881ddd3cda1a64ff22474562de1568522e9745",
--- a/testing/web-platform/tests/webrtc/RTCPeerConnection-track-stats.https.html
+++ b/testing/web-platform/tests/webrtc/RTCPeerConnection-track-stats.https.html
@@ -478,23 +478,24 @@
     callee.addTrack(tracks[1], streams[1]);
     exchangeIceCandidates(caller, callee);
     await doSignalingHandshake(caller, callee);
     await onIceConnectionStateCompleted(caller);
 
     let senderReport = await sender.getStats();
     let trackReport = await caller.getStats(sender.track);
 
+    // Verify the same stats objects are returned but don't compare each
+    // individual metric because timestamps and counters could have gone up
+    // between the two getStats() calls.
     senderReport.forEach(senderReportStat => {
-      let trackReportStat = trackReport.get(senderReportStat.id);
-      assert_object_equals(trackReportStat, senderReportStat);
+      assert_true(trackReport.has(senderReportStat.id));
     });
     trackReport.forEach(trackReportStat => {
-      let senderReportStat = senderReport.get(trackReportStat.id);
-      assert_object_equals(senderReportStat, trackReportStat);
+      assert_true(senderReport.has(trackReportStat.id));
     });
   }, 'RTCPeerConnection.getStats(sendingTrack) is the same as ' +
      'RTCRtpSender.getStats()');
 
   promise_test(async t => {
     const caller = new RTCPeerConnection();
     const callee = new RTCPeerConnection();
     let [tracks, streams] = await getUserMediaTracksAndStreams(2);
@@ -503,23 +504,24 @@
     exchangeIceCandidates(caller, callee);
     await doSignalingHandshake(caller, callee);
     await onIceConnectionStateCompleted(caller);
     let receiver = caller.getReceivers()[0];
 
     let receiverReport = await receiver.getStats();
     let trackReport = await caller.getStats(receiver.track);
 
+    // Verify the same stats objects are returned but don't compare each
+    // individual metric because timestamps and counters could have gone up
+    // between the two getStats() calls.
     receiverReport.forEach(receiverReportStat => {
-      let trackReportStat = trackReport.get(receiverReportStat.id);
-      assert_object_equals(trackReportStat, receiverReportStat);
+      assert_true(trackReport.has(receiverReportStat.id));
     });
     trackReport.forEach(trackReportStat => {
-      let receiverReportStat = receiverReport.get(trackReportStat.id);
-      assert_object_equals(receiverReportStat, trackReportStat);
+      assert_true(receiverReport.has(trackReportStat.id));
     });
   }, 'RTCPeerConnection.getStats(receivingTrack) is the same as ' +
      'RTCRtpReceiver.getStats()');
 
   promise_test(async t => {
     const pc = new RTCPeerConnection();
     let [tracks, streams] = await getUserMediaTracksAndStreams(1);
     await promise_rejects(t, 'InvalidAccessError', pc.getStats(tracks[0]));