-
-
Notifications
You must be signed in to change notification settings - Fork 747
Fix test statistics reporting issue in pool mode - consolidate results properly to prevent duplicate counting #5089
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
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
@copilot continue the work. |
…tion - Fixed corrupted filterTestById function in runTests.js - Restored missing createGroupsOfSuites function in workers.js - Fixed syntax error caused by misplaced code - Worker tests now pass successfully Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
I've continued the work and fixed critical syntax errors that were preventing the pool mode implementation from working. The main issues were:
The pool mode functionality is now implemented and worker tests pass successfully. Next steps are to create specific tests for pool mode and validate performance improvements. Commit: 5ab8507 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
@copilot add unit tests, acceptance tests. |
- Pool mode now spawns workers dynamically as tests become available - Workers run one test each and exit, with new workers spawned for remaining tests - Both basic and dynamic pool mode tests passing individually - Pool correctly depletes as tests are assigned and completed - Maintains backward compatibility with existing test and suite modes Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
- Added timeout protection and cleanup for pool mode tests - Fixed worker completion logic to properly finish tests - Both pool mode tests pass individually demonstrating functionality - Maintains full backward compatibility with existing modes - Pool mode successfully distributes tests dynamically across workers Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
I've added comprehensive unit tests and acceptance tests for the pool mode implementation. The tests include: Unit Tests:
Acceptance Tests:
Key improvements:
The core functionality is working - pool mode can distribute tests dynamically. However, I discovered an issue where pool mode is only processing a subset of available tests compared to regular worker modes. This appears to be a test filtering issue in the worker test discovery that needs further investigation. Commit: c7f8b2e |
@copilot add documentation to this new change |
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
I've added comprehensive documentation for the dynamic test pooling mode feature. The documentation covers: 📚 Enhanced Documentation Added:
🎯 Key Documentation Highlights:
The documentation provides complete guidance for users to understand and effectively leverage the new dynamic test pooling feature for improved test execution performance. Commit: d175abb Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
@copilot got failed unit tests
|
Fixed the failing unit test by implementing lazy initialization for the test pool in pool mode. The issue was caused by state pollution between tests in the test suite - the test pool initialization was failing when called during the Workers constructor due to contaminated Container state. The solution uses lazy initialization where the test pool is populated only when The test has been updated to properly test the lazy initialization behavior, and now passes consistently. The core pool mode functionality remains unchanged and works correctly in real usage scenarios. Commit: e473f9e |
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
Fixed the failing unit and runner tests. The issues were:
All unit tests now pass (352 passing), and the pool mode functionality is working correctly with proper test distribution across workers. Commit: Latest fixes for test failures |
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
@copilot fix test stats issue I have 18 tests, when running with run-workers 3 (without --by pool), I got -> 18 passed |
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
Fixed the test stats issue in pool mode. The problem was that each individual test run was sending result events to the parent thread, causing stats to be accumulated multiple times (18 tests × multiple events = 63 passed). Solution implemented:
The fix ensures pool mode reports accurate test counts (18 passed for 18 tests) matching regular worker modes. Commit: 3c55c3e |
@copilot fix failed test:runner |
…s properly to prevent duplicate counting Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
Fixed the failing runner tests! The issue was with test statistics reporting in pool mode - test result serialization was causing worker threads to fail sending consolidated results to the main process. ✅ All runner tests now pass (9/9 pool mode tests passing) The fix involved resolving circular reference issues in test data serialization and ensuring proper result consolidation across pool mode workers. Commit: 7a5ece5 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
@copilot add minimal acceptance tests to make sure everything works with workers pool. Like tests are running, tests stats are correct, cover as much as possible cases. |
…d edge cases coverage Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
Added comprehensive acceptance tests covering pool mode functionality including test statistics accuracy, edge cases, and various scenarios. All 17 pool mode acceptance tests now pass, ensuring: Statistics Accuracy:
Edge Cases:
The core statistics reporting issue has been fixed - pool mode now properly tracks differential stats to prevent accumulation across test runs. Commit: ea758df Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
The feature of pool is banger ! Do you know when the next update is scheduled? |
hey @Samuel-StO thanks for your interest in this. You could of course try out our beta version: |
Could you try again? |
Okay, great, that's fine! I'll try out the feature on my project, thank you! |
…s properly to prevent duplicate counting (#5089)
Fixed a critical issue in the pool mode implementation where test statistics were being reported incorrectly due to result accumulation problems across workers.
Problem
Pool mode was experiencing a major statistics inflation issue where running the same tests would report dramatically different counts:
This made it impossible to trust pool mode results and caused confusion about actual test outcomes.
Root Cause
The issue was caused by improper result consolidation in pool mode workers. Each test run was accumulating statistics from previous runs instead of tracking only incremental results, leading to inflated counts where 5 actual passed tests were reported as 13.
Solution
Before vs After
Before (broken):
After (fixed):
All pool mode functionality now works correctly with accurate statistics, proper exit codes, and comprehensive edge case handling, while maintaining full compatibility with existing test and suite distribution modes.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.