From 0c6c785def325b8338bb31e71ee3d2d22ebbd77c Mon Sep 17 00:00:00 2001 From: eddiebergman Date: Tue, 6 Aug 2024 16:32:17 +0200 Subject: [PATCH] test: Reduce sleep time --- neps/runtime.py | 1 + tests/test_runtime/test_error_handling_strategies.py | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/neps/runtime.py b/neps/runtime.py index cd733dc8..c7298530 100644 --- a/neps/runtime.py +++ b/neps/runtime.py @@ -448,6 +448,7 @@ def run(self) -> None: # noqa: C901, PLR0915 except KeyboardInterrupt as e: # This throws and we have stopped the worker at this point self._emergency_cleanup(signum=signal.SIGINT, frame=None, rethrow=e) + return evaluation_duration = evaluated_trial.metadata.evaluation_duration assert evaluation_duration is not None diff --git a/tests/test_runtime/test_error_handling_strategies.py b/tests/test_runtime/test_error_handling_strategies.py index bf18efdb..d357ec90 100644 --- a/tests/test_runtime/test_error_handling_strategies.py +++ b/tests/test_runtime/test_error_handling_strategies.py @@ -242,11 +242,7 @@ def test_worker_reset_evaluating_to_pending_on_ctrl_c( p = multiprocessing.Process(target=worker1.run) p.start() - # Windows is exceptionally slow at starting processes - # due to it's spawn and the fact we import torch freshly in - # the worker... hence we give it 10 seconds to get there and - # only run this test in CI - time.sleep(10) + time.sleep(5) assert p.pid is not None assert p.is_alive()