summaryrefslogtreecommitdiff
path: root/integrationtests/testhelpers.go
AgeCommit message (Collapse)Author
2026-03-13Harden integration server startup checksPaul Buetow
2026-03-05Improve lint/vet reliability and refactor client runtime/bootstrapPaul Buetow
2025-07-03fix: implement thread-safe turbo mode for MapReduce operationsPaul Buetow
- Add SafeAggregateSet wrapper with mutex protection for concurrent access - Implement TurboAggregate for direct line processing without channels - Fix race conditions in turbo mode MapReduce aggregation - Add proper synchronization for batch processing completion - Update shutdown sequence to ensure all data is serialized - Add integration test configuration for high-concurrency scenarios The turbo mode now correctly handles MapReduce queries with significant performance improvements while maintaining data integrity and preventing race conditions during concurrent aggregation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-30fix: improve test server cleanup to prevent intermittent TestDMap2 failuresPaul Buetow
Added explicit cleanup with a 100ms delay when test servers are started to ensure the server process terminates and releases its port before the next test runs. This prevents intermittent failures in TestDMap2 when it runs after other tests that use servers. The issue was that test servers could linger briefly after context cancellation, causing port conflicts when tests run in sequence. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-30fix: correct typo in testhelpers.go function namePaul Buetow
Fixed junCommandAndVerifyContents to runCommandAndVerifyContents. The TestDMap3 test was already using compareFilesContentsWithContext which properly handles order-independent comparison of MapReduce results. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-25Add comprehensive test logging infrastructure to integration testsPaul Buetow
- Add test logging infrastructure to track command execution and file comparisons - Generate .log files for each test with command history and manual verification commands - Ensure all temporary test files use .tmp suffix for consistency - Clean up .tmp files before each test run (not after) for clean test starts - Update .gitignore to exclude generated test artifacts (.log, .query files) - Fix dserver test configurations to use .tmp suffix for output files - Fix expected test outputs for dgrep context tests This change improves test debugging and verification by providing detailed logs of what each test does and allows manual verification of test results. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-25Add multi-server MapReduce integration testPaul Buetow
- Implement TestDMapMultiServer to test distributed MapReduce across multiple servers - Add support for environment variables in test server configuration - Fix TestDMap3 query to match expected output (was using non-existent $queriesPerSecond field) - Update test helpers to support environment variables for servers - All integration tests now pass successfully The multi-server test demonstrates: - MapReduce queries work correctly across multiple DTail servers - Data aggregation from all servers functions properly - GROUP BY operations work in distributed environment 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-25fix: Add 2-minute timeout to dmap tests and fix TestDMap5CSV hanging issuePaul Buetow
- Added createTestContextWithTimeout() helper function with 2-minute timeout - Updated all dmap tests to use timeout context instead of context.TODO() - Fixed TestDMap5CSV hanging issue: - Changed input file from non-existent csv_testdata.log to dmap5.csv.in - Removed "from CSVDATA" clause that caused dmap to hang on CSV input - Updated query to match expected transformed query format - Re-added third query to TestDMap4Append as requested - Split TestDMap4Append expected files for each subtest - All dmap tests now pass with proper timeout handling 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-24Add test helpers and refactoring guide for integration testsPaul Buetow
- Created testhelpers.go with reusable utilities to reduce code duplication - Added helper functions for common patterns: - skipIfNotIntegrationTest() for test skipping - TestServer for managing server lifecycle - CommandArgs for building command arguments - File cleanup helpers with t.Cleanup() - Dual mode test runner - Output verification helpers - Created REFACTORING_GUIDE.md documenting: - Common patterns found across tests - Refactoring strategy and benefits - Examples showing 40-50% code reduction - Metrics and next steps This sets the foundation for incrementally refactoring the integration tests to be more maintainable and less error-prone. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>