Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(757)

Side by Side Diff: infra_libs/ts_mon/test/interface_test.py

Issue 1260293009: make version of ts_mon compatible with appengine (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: add noncululativedistribution metric to ts_mon imports Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « infra_libs/ts_mon/test/helpers_test.py ('k') | infra_libs/ts_mon/test/metrics_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import functools 5 import functools
6 import threading 6 import threading
7 import time 7 import time
8 import unittest 8 import unittest
9 9
10 import mock 10 import mock
11 11
12 from testing_support import auto_stub 12 from testing_support import auto_stub
13 13
14 from infra_libs.ts_mon import errors
15 from infra_libs.ts_mon import interface 14 from infra_libs.ts_mon import interface
15 from infra_libs.ts_mon.common import errors
16 from infra_libs.ts_mon.test import stubs 16 from infra_libs.ts_mon.test import stubs
17 17
18 18
19 class GlobalsTest(auto_stub.TestCase): 19 class GlobalsTest(auto_stub.TestCase):
20 20
21 def setUp(self): 21 def setUp(self):
22 super(GlobalsTest, self).setUp() 22 super(GlobalsTest, self).setUp()
23 self.mock(interface, 'state', stubs.MockState()) 23 self.mock(interface, 'state', stubs.MockState())
24 24
25 def tearDown(self): 25 def tearDown(self):
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 282
283 def test_sleeps_for_minimum_zero_secs(self): 283 def test_sleeps_for_minimum_zero_secs(self):
284 self.t.start() 284 self.t.start()
285 285
286 # Flush takes 65 seconds. 286 # Flush takes 65 seconds.
287 interface.flush.side_effect = functools.partial(self.increment_time, 65) 287 interface.flush.side_effect = functools.partial(self.increment_time, 65)
288 288
289 self.assertInRange(30, 60, self.stop_event.timeout_wait()) 289 self.assertInRange(30, 60, self.stop_event.timeout_wait())
290 self.assertAlmostEqual(0, self.stop_event.timeout_wait()) 290 self.assertAlmostEqual(0, self.stop_event.timeout_wait())
291 self.assertAlmostEqual(0, self.stop_event.timeout_wait()) 291 self.assertAlmostEqual(0, self.stop_event.timeout_wait())
OLDNEW
« no previous file with comments | « infra_libs/ts_mon/test/helpers_test.py ('k') | infra_libs/ts_mon/test/metrics_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698