Backout 66a9982a4bc9 (bug 760902) for frequent orange
authorGregory Szorc <gps@mozilla.com>
Fri, 13 Jul 2012 23:15:21 -0700
changeset 99307 d9d878d5b8a7e8c8bd569971e33844e998d8fb09
parent 99306 66a9982a4bc9ca3284a1bc0cf139a0eee386bac6
child 99308 8e2f9cc15bd32659d9564c66a3ab49fa691d2d4d
push id23117
push usergszorc@mozilla.com
push dateSat, 14 Jul 2012 20:35:19 +0000
treeherdermozilla-central@8e2f9cc15bd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs760902
milestone16.0a1
backs out66a9982a4bc9ca3284a1bc0cf139a0eee386bac6
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
Backout 66a9982a4bc9 (bug 760902) for frequent orange
services/aitc/tests/unit/test_aitc_manager.js
--- a/services/aitc/tests/unit/test_aitc_manager.js
+++ b/services/aitc/tests/unit/test_aitc_manager.js
@@ -139,56 +139,16 @@ add_test(function test_manager_alreadysy
       do_check_eq(num, -1);
       do_check_eq(manager._pending.length, 1);
       // Clear queue for next test.
       manager._pending.dequeue(run_next_test);
     });
   }
 });
 
-add_test(function test_manager_getfrequency() {
-  const activeFreq = 500;
-  const username = "resu";
-  PREFS.set("manager.getActiveFreq", activeFreq);
-
-  let lastRequestTime = 0;
-  let mockRequestCount = 0;
-
-  let server = get_server_with_user(username);
-  server.onRequest = function onRequest() {
-    mockRequestCount++;
-
-    let timeDiff = Date.now() - lastRequestTime;
-    // We assume nsITimer has +/- 100ms variance.
-    do_check_true(activeFreq <= timeDiff + 100);
-    lastRequestTime = Date.now();
-
-    // Run for 4 GETs, then stop.
-    if (mockRequestCount == 4) {
-      manager._state = manager._PASSIVE;
-      manager._client = null;
-      manager._lastToken = null;
-      server.stop(run_next_test);
-    }
-  };
-  server.mockStatus = {code: 304};
-
-  let client = get_client_for_server(username, server);
-  let manager = new AitcManager(function() {
-    CommonUtils.nextTick(gotManager);
-  }, client);
-
-  function gotManager() {
-    // Token is all good.
-    manager._lastTokenTime = new Date();
-    // Initiate GETs at active frequency.
-    manager._state = manager._ACTIVE;
-  }
-});
-
 add_test(function test_401_responses() {
   PREFS.set("client.backoff", "50");
   PREFS.set("manager.putFreq", 50);
   const app = get_mock_app();
   const username = "123";
   const premadeToken = {
     id: "testtest",
     key: "testtest",