diff options
author | Aleksey Lim <alsroot@sugarlabs.org> | 2013-05-05 13:45:05 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@sugarlabs.org> | 2013-05-05 13:45:05 (GMT) |
commit | f110a1687bc62c123d2997094f38bd0b87e48cb8 (patch) | |
tree | 62393c7918123e08ae73ef395072b85722919c25 | |
parent | 9d513e249375c89beba588eef259d19235f98b2e (diff) |
Actualize tests
-rwxr-xr-x | tests/units/client/online_commands.py | 3 | ||||
-rwxr-xr-x | tests/units/db/volume.py | 2 | ||||
-rwxr-xr-x | tests/units/node/master.py | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/tests/units/client/online_commands.py b/tests/units/client/online_commands.py index e3bc8ee..f5fb506 100755 --- a/tests/units/client/online_commands.py +++ b/tests/units/client/online_commands.py @@ -778,10 +778,11 @@ class OnlineCommandsTest(tests.Test): 'notes': '', 'spec': {'*-*': {}}, }) + coroutine.sleep(.5) assert injector._mtime > mtime mtime = injector._mtime - coroutine.sleep(1.5) + coroutine.sleep(1) impl2 = ipc.post(['implementation'], { 'context': context, diff --git a/tests/units/db/volume.py b/tests/units/db/volume.py index ce7835d..7476435 100755 --- a/tests/units/db/volume.py +++ b/tests/units/db/volume.py @@ -510,7 +510,7 @@ class VolumeTest(tests.Test): self.volume = db.Volume(tests.tmpdir, [TestDocument]) - ts = time.time() + ts = int(time.time()) guid = self.call(method='POST', document='testdocument', content={}) assert self.volume['testdocument'].get(guid)['ctime'] in range(ts - 1, ts + 1) assert self.volume['testdocument'].get(guid)['mtime'] in range(ts - 1, ts + 1) diff --git a/tests/units/node/master.py b/tests/units/node/master.py index 79d44f1..68a63e9 100755 --- a/tests/units/node/master.py +++ b/tests/units/node/master.py @@ -171,7 +171,7 @@ class MasterTest(tests.Test): 'devel': [['devel']], }, }) - coroutine.dispatch() + coroutine.sleep(.5) self.assertEqual({ 'Gentoo-2.1': {'status': 'success', 'binary': ['bin'], 'devel': ['devel']}, }, @@ -200,6 +200,7 @@ class MasterTest(tests.Test): self.assertEqual(0, len(events)) ipc.put(['context', guid, 'dependencies'], ['foo']) + coroutine.sleep(.1) self.assertEqual(1, len(events)) assert 'mtime' in events[0]['props'] del events[:] |