From 0f8d7668dae54f960ec4cea3fcd3f4652f962a5a Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Tue, 7 May 2024 09:19:07 +0200 Subject: [PATCH] mock right lock --- tangostationcontrol/test/beam/test_delays.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tangostationcontrol/test/beam/test_delays.py b/tangostationcontrol/test/beam/test_delays.py index 4169f4d53..5e67e47d8 100644 --- a/tangostationcontrol/test/beam/test_delays.py +++ b/tangostationcontrol/test/beam/test_delays.py @@ -12,7 +12,8 @@ import numpy import numpy.testing import threading -from tangostationcontrol.beam.delays import Delays, threading as delays_threading +from tangostationcontrol.beam import delays +from tangostationcontrol.beam.delays import Delays from tangostationcontrol.common.constants import MAX_ANTENNA, N_beamlets_ctrl from test import base @@ -252,13 +253,14 @@ class TestDelaysBulk(base.TestCase): # most about the worst case for a thread. We assume the worst # case thread is slowed down by all the work of the other threads. self.assertLess( - max(duration_results_ms) / nr_threads, single_thread_execution_time * 1.25 + max(duration_results_ms) / nr_threads, + single_thread_execution_time * 1.50, # 50% tolerance ) # report the performance if we remove the compute lock around casacore, to detect # on which systems it matters. - with mock.patch.object(delays_threading, "Lock") as m_lock: + with mock.patch.object(delays, "compute_lock") as m_lock: # compare against multi-threaded performance duration_results_ms = [] threads = [ -- GitLab