diff --git a/parsl/tests/test_scaling/test_regression_1621.py b/parsl/tests/test_scaling/test_regression_1621.py index bb367c379a..5159c3beb0 100644 --- a/parsl/tests/test_scaling/test_regression_1621.py +++ b/parsl/tests/test_scaling/test_regression_1621.py @@ -9,6 +9,14 @@ from parsl.launchers import SimpleLauncher from parsl.providers import LocalProvider +# Timing notes: +# The configured strategy_period must be much smaller than the delay in +# app() so that multiple iterations of the strategy have had a chance +# to (mis)behave. +# The status polling interval in OneShotLocalProvider must be much bigger +# than the above times, so that the job status cached from the provider +# will not be updated while the single invocation of app() runs. + @parsl.python_app def app(): @@ -55,20 +63,12 @@ def test_one_block(tmpd_cwd): ) ], strategy='simple', + strategy_period=0.1 ) - parsl.load(config) - dfk = parsl.dfk() - - def poller(): - import time - while True: - dfk.job_status_poller.poll() - time.sleep(0.1) + with parsl.load(config): + app().result() - threading.Thread(target=poller, daemon=True).start() - app().result() - parsl.dfk().cleanup() parsl.clear() assert oneshot_provider.recorded_submits == 1