diff --git a/behavex/runner.py b/behavex/runner.py index 69d340b..b78461b 100644 --- a/behavex/runner.py +++ b/behavex/runner.py @@ -168,15 +168,18 @@ def setup_running_failures(args_parsed): def init_multiprocessing(idQueue, parallel_delay): - """Initialize multiprocessing by ignoring SIGINT signals.""" - signal.signal(signal.SIGINT, signal.SIG_IGN) - # Retrieve one of the unique IDs - worker_id = idQueue.get() - # Use the unique ID to name the process - multiprocessing.current_process().name = f'behave_worker-{worker_id}' - # Add delay - if parallel_delay > 0: - time.sleep(parallel_delay / 1000.0) + try: + signal.signal(signal.SIGINT, signal.SIG_IGN) + # Retrieve one of the unique IDs + worker_id = idQueue.get() + # Use the unique ID to name the process + multiprocessing.current_process().name = f'behave_worker-{worker_id}' + # Add an initial delay to avoid all processes starting at the same time + if parallel_delay > 0: + time.sleep(parallel_delay / 1000.0) + except Exception as e: + logging.error(f"Exception in init_multiprocessing: {e}") + raise def launch_behavex(): diff --git a/pyproject.toml b/pyproject.toml index ebf0eaf..2053294 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta" [project] name = "behavex" -version = "4.0.4rc1" -description = "Agile test wrapper on top of Behave (BDD)." +version = "4.0.4rc2" +description = "Agile testing framework on top of Behave (BDD)." readme = "README.md" license = { text = "MIT" } authors = [ diff --git a/setup.py b/setup.py index 82ff1c1..627d40c 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name='behavex', - version='4.0.4rc1', + version='4.0.4rc2', license="MIT", platforms=['any'], python_requires='>=3.5', @@ -15,7 +15,7 @@ url='https://github.com/hrcorval/behavex', packages=find_packages(exclude=['tests']), include_package_data=True, - description='Agile test wrapper on top of Behave (BDD).', + description='Agile testing framework on top of Behave (BDD).', long_description_content_type='text/markdown', long_description=long_description, entry_points={