test/coredevice/time_keeps_running: start new session to prevent now_mu save/restore

This commit is contained in:
Sebastien Bourdeauducq 2016-03-08 14:04:51 +08:00
parent 739568fcb8
commit 59d7f5f1e3
1 changed files with 3 additions and 0 deletions

View File

@ -234,8 +234,11 @@ class CoredeviceTest(ExperimentCase):
def test_time_keeps_running(self):
self.execute(TimeKeepsRunning)
t1 = self.dataset_mgr.get("time_at_start")
self.device_mgr.get("comm").close() # start a new session
self.execute(TimeKeepsRunning)
t2 = self.dataset_mgr.get("time_at_start")
dead_time = mu_to_seconds(t2 - t1, self.device_mgr.get("core"))
print(dead_time)
self.assertGreater(dead_time, 1*ms)