This is an automated email from the ASF dual-hosted git repository.

altay pushed a commit to branch aaltay-patch-1-1
in repository https://gitbox.apache.org/repos/asf/beam.git

commit a96eaebd16017ef7286cd00679ae81e30319eabe
Author: Ahmet Altay <aal...@gmail.com>
AuthorDate: Mon Nov 25 16:15:44 2019 -0800

    Increase overhaed budget for test_sampler_transition_overhead
    
    Fixes the mistake from https://github.com/apache/beam/pull/10012. 
https://github.com/apache/beam/pull/10012 doubled the measured time instead of 
the allowed overhead.
---
 sdks/python/apache_beam/runners/worker/statesampler_test.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/sdks/python/apache_beam/runners/worker/statesampler_test.py 
b/sdks/python/apache_beam/runners/worker/statesampler_test.py
index 855d48d..ed51ae1 100644
--- a/sdks/python/apache_beam/runners/worker/statesampler_test.py
+++ b/sdks/python/apache_beam/runners/worker/statesampler_test.py
@@ -123,15 +123,11 @@ class StateSamplerTest(unittest.TestCase):
     state_transition_count = sampler.get_info().transition_count
     overhead_us = 1000000.0 * elapsed_time / state_transition_count
 
-    # TODO: This test is flaky when it is run under load. A better solution
-    # would be to change the test structure to not depend on specific timings.
-    overhead_us = 2 * overhead_us
-
     _LOGGER.info('Overhead per transition: %fus', overhead_us)
     # Conservative upper bound on overhead in microseconds (we expect this to
     # take 0.17us when compiled in opt mode or 0.48 us when compiled with in
     # debug mode).
-    self.assertLess(overhead_us, 10.0)
+    self.assertLess(overhead_us, 20.0)
 
 
 if __name__ == '__main__':

Reply via email to