-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[UT] Add SQL tests for mem_pool property of resource groups #65859
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: main
Are you sure you want to change the base?
[UT] Add SQL tests for mem_pool property of resource groups #65859
Conversation
|
@arin-mirza Please add backport to 4.0. |
|
@cursor review |
|
|
||
| show verbose resource groups all; | ||
| -- result: | ||
| [REGEX][^shared_resource_group_for_brad] |
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.
Bug: Incorrect regex pattern for negative string match
The regex pattern [REGEX][^shared_resource_group_for_brad] incorrectly uses a negated character class, which matches any single character NOT in the set of characters from the string, rather than verifying the string itself is absent from the output. This causes the test to pass incorrectly regardless of whether shared_resource_group_for_brad exists. A negative lookahead like ^(?!.*shared_resource_group_for_brad).*$ would properly verify the resource group was not created.
| 'mem_pool' = 'shared_pool_for_alex_and_brad' | ||
| ); | ||
| -- result: | ||
| [REGEX]Property `mem_limit` must be equal for all resource groups using the mem_pool \[shared_pool_for_alex_and_brad\] |
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.
Bug: Missing error format wrapper in expected result
The expected error result is missing the E: (error_code, '...') wrapper format. The pattern should be E: (1064, 'Property \mem_limit` must be equal...')` to match the actual error format returned by the system, consistent with other error assertions in the test suite. Without this wrapper, the test will fail to match the actual error output.
|
@arin-mirza could you sign the CLA? |
|
@mergify rebase |
✅ Branch has been successfully rebased |
c525342 to
6f8a6c8
Compare
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
Why I'm doing:
The mem_pool property for resource groups was recently introduced.
There are currently no end-to-end SQL test cases for this functionality.
What I'm doing:
This pull request adds SQL tests, checking the correctness of the behavior under the following scenarios:
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check:
Note
Add SQL tests validating
mem_poolon resource groups: creation, shared-pool constraints, and disallowed alterations.mem_poolin resource groups (test/sql/test_resource_group_mem_pool/...):test_create_resource_group_with_mem_poolverifiesmem_poolsurfaced inshow verbose resource groups.mem_limit):test_create_two_resource_groups_with_mem_poolensures two groups can share the samemem_poolwith matchingmem_limit.test_create_resource_group_with_mem_pool_then_try_alterblocks changingmem_poolandmem_limitwhenmem_poolis set; allows updatingmax_cpu_cores.test_create_two_resource_groups_with_mem_pool_then_try_alterblocks changingmem_poolfor groups sharing a pool.test_create_two_resource_groups_with_mem_pool_different_mem_limitrejects creating a second group on the samemem_poolwith a differentmem_limit.R/(with expected results/regex) andT/variants added for all scenarios.Written by Cursor Bugbot for commit 6f8a6c8. This will update automatically on new commits. Configure here.