From a96eaebd16017ef7286cd00679ae81e30319eabe Mon Sep 17 00:00:00 2001 From: Ahmet Altay Date: Mon, 25 Nov 2019 16:15:44 -0800 Subject: [PATCH] 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 855d48d81152..ed51ae14bdb1 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 @@ def test_sampler_transition_overhead(self): 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__':