From: Christian Herdtweck Date: Wed, 24 Oct 2018 13:11:27 +0000 (+0200) Subject: Fix units and threshold for log read test X-Git-Tag: v1.3~5 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=583479796ba6ed2e5d6540bf92fe2eb678ba9fc9;p=pyi2ncommon Fix units and threshold for log read test --- diff --git a/test/test_log_read.py b/test/test_log_read.py index 951b4c7..2074f59 100644 --- a/test/test_log_read.py +++ b/test/test_log_read.py @@ -201,13 +201,13 @@ class LogReadTester(unittest.TestCase): count_text = int(text[:index].strip()) self.assertEqual(count_text, counter) write_time = float(text[index+1:].strip()) - time_diffs.append((receive_time - write_time)*1.e6) + time_diffs.append((receive_time - write_time)*1000.) if counter == n_texts-1: print('stop since have {0} reads'.format(counter)) break print('time diffs in ms: {0}'.format(time_diffs)) - self.assertTrue(max(time_diffs) < 1000., - 'read took more than 1ms (max was {0:.3f}ms)!' + self.assertTrue(max(time_diffs) < 100., + 'read took more than 100ms (max was {0:.3f}ms)!' .format(max(time_diffs))) def test_line_read(self):