Skip to content

test(driver): add testing for thread safety of driver (#54) - #1686

Open
vardhans07 wants to merge 1 commit into
apache:mainfrom
vardhans07:test/driver-thread-safety
Open

test(driver): add testing for thread safety of driver (#54)#1686
vardhans07 wants to merge 1 commit into
apache:mainfrom
vardhans07:test/driver-thread-safety

Conversation

@vardhans07

Copy link
Copy Markdown

Description

Closes #54

Adds dedicated unit tests verifying that a single Driver instance is thread-safe and can handle concurrent executions across multiple threads without data interference.

Changes Made

  • Added test_driver_thread_safety to tests/test_hamilton_driver.py.
  • Used ad_hoc_utils.create_temporary_module for isolated DAG compilation.
  • Tested concurrent execution across 50 tasks using concurrent.futures.ThreadPoolExecutor.
  • Parametrized over standard Driver builder and task-based dynamic executors (SynchronousLocalTaskExecutor).

Testing Done

  • Validated locally with pytest tests/test_hamilton_driver.py -k "test_driver_thread_safety" -v (PASSED).
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add testing for thread safety of driver

1 participant