Fix units and threshold for log read test
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Wed, 24 Oct 2018 13:11:27 +0000 (15:11 +0200)
committerPlamen Dimitrov <pdimitrov@pevogam.com>
Mon, 5 Nov 2018 08:59:00 +0000 (16:59 +0800)
test/test_log_read.py

index 951b4c7..2074f59 100644 (file)
@@ -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):