Skip to content

Commit 56ef251

Browse files
committed
Updated timing tests to work with Windows timer resolution
Updated the cyclic timing tests to work with Windows given the recent changes to the timer resolution.
1 parent 6d43977 commit 56ef251

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

test/simplecyclic_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SimpleCyclicSendTaskTest(unittest.TestCase, ComparingMessagesTestCase):
1919

2020
def __init__(self, *args, **kwargs):
2121
unittest.TestCase.__init__(self, *args, **kwargs)
22-
ComparingMessagesTestCase.__init__(self, allowed_timestamp_delta=0.016, preserves_channel=True)
22+
ComparingMessagesTestCase.__init__(self, allowed_timestamp_delta=0.03, preserves_channel=True)
2323

2424
@unittest.skipIf(IS_CI, "the timing sensitive behaviour cannot be reproduced reliably on a CI server")
2525
def test_cycle_time(self):
@@ -37,8 +37,8 @@ def test_cycle_time(self):
3737
sleep(2)
3838
size = bus2.queue.qsize()
3939
# About 100 messages should have been transmitted
40-
self.assertTrue(80 <= size <= 120,
41-
'100 +/- 20 messages should have been transmitted. But queue contained {}'.format(size))
40+
self.assertTrue(60 <= size <= 100,
41+
'at least 60 messages should have been transmitted. But queue contained {}'.format(size))
4242
last_msg = bus2.recv()
4343
next_last_msg = bus2.recv()
4444

0 commit comments

Comments
 (0)