-
-
Notifications
You must be signed in to change notification settings - Fork 91
Restructure the test runner for better code coherency #3093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Claude finished @thomhurst's task —— View job Code Review for PR #3093Reviewing the pull request that fixes Before(Class) and After(Class) appearing parallel when in different ParallelGroups. Todo List:
Implementation OverviewThe PR introduces a sophisticated coordination mechanism for class-level hooks to ensure proper sequential execution in different execution contexts. Key changes:
✅ StrengthsCode Quality & Design
Performance Considerations
Architecture
|
…llel execution handling
Claude finished @thomhurst's task —— View job Code Review for PR #3093Reviewing the pull request that fixes Before(Class) and After(Class) appearing parallel when in different ParallelGroups. Todo List:
Code Review SummaryThis PR introduces a solid architectural solution to coordinate class hooks properly across different execution contexts. The implementation demonstrates good understanding of the problem and provides a comprehensive fix. ✅ StrengthsArchitecture & Design
Implementation Quality
Code Quality
|
Claude finished @thomhurst's task —— View job Code Review for PR #3093Reviewing the pull request that fixes Before(Class) and After(Class) appearing parallel when in different ParallelGroups. Todo List:
Code Review SummaryThis PR introduces a solid architectural solution to coordinate class hooks properly across different execution contexts. The implementation demonstrates good understanding of the problem and provides a comprehensive fix. ✅ StrengthsArchitecture & Design
Implementation Quality
Code Quality
|
Claude finished @thomhurst's task —— View job Code Review for PR #3093Reviewing the pull request that fixes Before(Class) and After(Class) appearing parallel when in different ParallelGroups. Todo List:
Code Review SummaryThis PR introduces a well-architected solution to fix the coordination of Before(Class) and After(Class) hooks when running in different ParallelGroups. The implementation follows TUnit's principles and maintains both source-generated and reflection mode compatibility. ✅ StrengthsArchitecture & Design
Code Quality
Performance Considerations
|
…ination logic The HookOrchestrator was experiencing deadlocks due to execution context capture in the GetOrAdd factory delegate, causing semaphores to be acquired but never released properly when tests had different execution contexts. Changes: - Extract coordination logic into dedicated SequentialCoordinator class - Move coordination from cached BeforeClass task to per-test evaluation - Use TryAdd pattern to ensure only one coordination token per class - Eliminate complex state tracking with multiple dictionaries - Add proper resource disposal with IDisposable pattern This fixes deadlocks in sequential test execution contexts while maintaining proper coordination semantics and preventing semaphore leaks. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Claude finished @thomhurst's task —— View job Code Review for PR #3093Reviewing the pull request that fixes Before(Class) and After(Class) appearing parallel when in different ParallelGroups. Todo List:
Code Review SummaryThis PR introduces a well-architected solution to fix the coordination of Before(Class) and After(Class) hooks when running in different ParallelGroups. The implementation follows TUnit's principles and maintains both source-generated and reflection mode compatibility. ✅ StrengthsArchitecture & Design
Code Quality
Performance Considerations
|
The previous fix had a race condition where multiple tests could acquire semaphores for the same class, leading to deadlocks when only one token was stored but multiple semaphores were acquired. Changes: - Replace per-test semaphore acquisition with GetOrAdd pattern - Ensure only one coordination task per class type - All tests for same class wait on the same coordination task - Eliminate race condition between acquisition and storage - Add proper async cleanup in disposal methods Tests now complete in ~1s instead of hanging indefinitely. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Claude finished @thomhurst's task —— View job Code Review for PR #3093Reviewing the pull request that fixes Before(Class) and After(Class) appearing parallel when in different ParallelGroups. Todo List:
Code Review SummaryThis PR introduces a well-architected solution to fix the coordination of Before(Class) and After(Class) hooks when running in different ParallelGroups. The implementation follows TUnit's principles and maintains both source-generated and reflection mode compatibility. ✅ StrengthsArchitecture & Design
Code Quality
Performance Considerations
|
Fixes #3044