-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[clickhouse][chore] Update unit tests snapshots to handle multiple queries #7865
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
[clickhouse][chore] Update unit tests snapshots to handle multiple queries #7865
Conversation
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7865 +/- ##
==========================================
- Coverage 95.49% 95.47% -0.02%
==========================================
Files 305 305
Lines 16174 16192 +18
==========================================
+ Hits 15445 15460 +15
- Misses 571 573 +2
- Partials 158 159 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Metrics Comparison SummaryTotal changes across all snapshots: 0 Detailed changes per snapshotsummary_metrics_snapshot_cassandra📊 Metrics Diff SummaryTotal Changes: 0
summary_metrics_snapshot_cassandra📊 Metrics Diff SummaryTotal Changes: 0
summary_metrics_snapshot_cassandra📊 Metrics Diff SummaryTotal Changes: 0
summary_metrics_snapshot_cassandra📊 Metrics Diff SummaryTotal Changes: 0
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the snapshot testing infrastructure for ClickHouse tracestore unit tests to support multiple queries per test. The change modifies the verifyQuerySnapshot function to accept variadic query parameters and updates the snapshot file naming convention to include a sequential index suffix.
Changes:
- Modified
verifyQuerySnapshotfunction to accept multiple queries via variadic parameters - Updated snapshot file naming to include a
_1,_2, etc. suffix indicating query execution order - Regenerated all existing snapshot files with the new
_1suffix to maintain compatibility
Reviewed changes
Copilot reviewed 1 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/storage/v2/clickhouse/tracestore/driver_test.go | Updated verifyQuerySnapshot function to handle multiple queries with indexed filenames, added comprehensive documentation |
| internal/storage/v2/clickhouse/tracestore/snapshots/TestWriter_Success_1.sql | Regenerated snapshot file with new naming convention (_1 suffix) |
| internal/storage/v2/clickhouse/tracestore/snapshots/TestGetTraces_Success/single_span_1.sql | Regenerated snapshot file with new naming convention (_1 suffix) |
| internal/storage/v2/clickhouse/tracestore/snapshots/TestGetTraces_Success/multiple_spans_1.sql | Regenerated snapshot file with new naming convention (_1 suffix) |
| internal/storage/v2/clickhouse/tracestore/snapshots/TestGetServices/successfully_returns_services_1.sql | Regenerated snapshot file with new naming convention (_1 suffix) |
| internal/storage/v2/clickhouse/tracestore/snapshots/TestGetOperations/successfully_returns_operations_for_all_kinds_1.sql | Regenerated snapshot file with new naming convention (_1 suffix) |
| internal/storage/v2/clickhouse/tracestore/snapshots/TestGetOperations/successfully_returns_operations_by_kind_1.sql | Regenerated snapshot file with new naming convention (_1 suffix) |
| internal/storage/v2/clickhouse/tracestore/snapshots/TestFindTraces_WithFilters_1.sql | Regenerated snapshot file with new naming convention (_1 suffix) |
| internal/storage/v2/clickhouse/tracestore/snapshots/TestFindTraces_Success/single_span_1.sql | Regenerated snapshot file with new naming convention (_1 suffix) |
| internal/storage/v2/clickhouse/tracestore/snapshots/TestFindTraces_Success/multiple_spans_1.sql | Regenerated snapshot file with new naming convention (_1 suffix) |
| internal/storage/v2/clickhouse/tracestore/snapshots/TestFindTraceIDs_1.sql | Regenerated snapshot file with new naming convention (_1 suffix) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…eries (jaegertracing#7865) ## Which problem is this PR solving? - Towards jaegertracing#7134 ## Description of the changes - This is a follow-up to jaegertracing#7839 to have the snapshot testing handle multiple queries executed within a single test in preparation for jaegertracing#7839. The snapshot files will now be indexed to see the order in which the queries were executed. ## How was this change tested? - CI ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Which problem is this PR solving?
Description of the changes
How was this change tested?
Checklist
jaeger:make lint testjaeger-ui:npm run lintandnpm run test