Bug 961162 - Fix intermittent failures in test_networkstats_service_proxy.js. r=gene
authorAlbert Crespell <acperez@tid.es>
Mon, 27 Jan 2014 13:16:01 +0100
changeset 165565 d8d208d749bd2a04106ddd8398ad6760e2c14116
parent 165564 f1e87cf3685db7ad7381e187dcf35d5c66dac677
child 165566 9441f9619749594ca288bc60f12f4664b0e33706
push id4623
push userryanvm@gmail.com
push dateTue, 28 Jan 2014 21:48:39 +0000
treeherderfx-team@7e79536aca0a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgene
bugs961162
milestone29.0a1
Bug 961162 - Fix intermittent failures in test_networkstats_service_proxy.js. r=gene
dom/network/tests/unit_stats/test_networkstats_service_proxy.js
--- a/dom/network/tests/unit_stats/test_networkstats_service_proxy.js
+++ b/dom/network/tests/unit_stats/test_networkstats_service_proxy.js
@@ -122,20 +122,20 @@ add_test(function test_saveServiceStats(
       do_check_eq(cachedStats[key2].appId, 0);
       do_check_eq(cachedStats[key1].serviceType, serviceType);
       do_check_eq(cachedStats[key2].networkId, mobile.id);
       do_check_eq(cachedStats[key2].networkType, mobile.type);
       do_check_eq(new Date(cachedStats[key2].date).getTime() / 1000,
                   Math.floor(timestamp / 1000));
       do_check_eq(cachedStats[key2].rxBytes, 50);
       do_check_eq(cachedStats[key2].txBytes, 100);
+
+      run_next_test();
     }
   );
-
-  run_next_test();
 });
 
 add_test(function test_saveStatsWithDifferentDates() {
   var today = NetworkStatsService.cachedStatsDate;
   var tomorrow = new Date(today.getTime() + (24 * 60 * 60 * 1000));
 
   var wifi = {type: Ci.nsINetworkInterface.NETWORK_TYPE_WIFI, id: "0"};
   var mobile = {type: Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE, id: "1234"};