Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[TT-17199] test: fix flaky mcp sql aggregate tests #1004
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
base: master
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
[TT-17199] test: fix flaky mcp sql aggregate tests #1004
Changes from all commits
a92bc84File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Check warning on line 206 in pumps/mcp_sql_aggregate_test.go
performance Issue
Raw output
Check warning on line 206 in pumps/mcp_sql_aggregate_test.go
logic Issue
Raw output
Check the error and fail the test if the cleanup fails. For example, change line 206 to: ```go _, err := pump.db.Exec(fmt.Sprintf("DELETE FROM %q", tableName)) require.NoError(t, err) ```Check warning on line 207 in pumps/mcp_sql_aggregate_test.go
security Issue
Raw output
Check failure on line 240 in pumps/mcp_sql_aggregate_test.go
logic Issue
Raw output
Instead of dropping the base table, explicitly drop the specific sharded tables that this test creates and queries. This requires defining the timestamps used in the test before the cleanup logic. ```go // Define timestamps to be used in the test ts1 := time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC) ts2 := time.Date(2025, 1, 2, 0, 0, 0, 0, time.UTC) // Clean up sharded tables from previous runs tableName1 := fmt.Sprintf("%s_%s", tableName, ts1.Format("20060102")) tableName2 := fmt.Sprintf("%s_%s", tableName, ts2.Format("20060102")) _, err := pump.db.Exec(fmt.Sprintf("DROP TABLE IF EXISTS %q", tableName1)) require.NoError(t, err) _, err = pump.db.Exec(fmt.Sprintf("DROP TABLE IF EXISTS %q", tableName2)) require.NoError(t, err) ``` This logic should replace the `DROP TABLE` call on line 240. You will also need to update the `record1` and `record2` initializations to use `ts1` and `ts2` respectively.Check failure on line 245 in pumps/mcp_sql_aggregate_test.go
architecture Issue
Raw output
Uh oh!
There was an error while loading. Please reload this page.