Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added echo
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
-- name: test_create_resource_group_with_mem_pool

[UC] drop resource group shared_resource_group_for_test_user;

[UC] create resource group shared_resource_group_for_test_user
to (user='test_user')
with (
'cpu_weight' = '12',
'mem_limit' = '20%',
'mem_pool' = 'test_pool_1'
);

show verbose resource groups all;
-- result:
[REGEX]shared_resource_group_for_test_user.+12.+20(\.\d+)?%.+NORMAL.+\(id=\d+,.+user=test_user\)\s*(test_pool_1)
-- !result

[UC] drop resource group shared_resource_group_for_test_user;
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
-- name: test_create_resource_group_with_mem_pool_then_try_alter

[UC] drop resource group shared_resource_group_for_james;

[UC] create resource group shared_resource_group_for_james
to (user='james')
with (
'cpu_weight' = '9',
'mem_limit' = '66%',
'max_cpu_cores' = "8",
'mem_pool' = 'mem_pool_for_james'
);

show verbose resource groups all;
-- result:
[REGEX]shared_resource_group_for_james.+9.+66(\.\d+)?%.+8.+NORMAL.+\(id=\d+,.+user=james\)\s*(mem_pool_for_james)
-- !result

alter resource group shared_resource_group_for_james with (
'mem_limit' = '99%',
'mem_pool' = 'other_pool'
);
-- result:
E: (1064, 'Property `mem_pool` cannot be altered [mem_pool_for_james].')
-- !result


alter resource group shared_resource_group_for_james with (
'mem_limit' = '99%'
);
-- result:
E: (1064, 'Property `mem_limit` cannot be altered for resource groups with mem_pool [mem_pool_for_james].')
-- !result

alter resource group shared_resource_group_for_james with (
'max_cpu_cores' = "1"
);
-- result:
-- !result

show verbose resource groups all;
-- result:
[REGEX]shared_resource_group_for_james.+9.+66(\.\d+)?%.+1.+NORMAL.+\(id=\d+,.+user=james\)\s*(mem_pool_for_james)
-- !result

[UC] drop resource group shared_resource_group_for_james;
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
-- name: test_create_two_resource_groups_with_mem_pool

[UC] drop resource group shared_resource_group_for_john;
[UC] drop resource group shared_resource_group_for_jane;

[UC] create resource group shared_resource_group_for_john
to (user='john')
with (
'cpu_weight' = '7',
'mem_limit' = '55%',
'mem_pool' = 'shared_pool_john_and_jane'
);


[UC] create resource group shared_resource_group_for_jane
to (user='jane')
with (
'cpu_weight' = '8',
'mem_limit' = '55%',
'mem_pool' = 'shared_pool_john_and_jane'
);

show verbose resource groups all;
-- result:
[REGEX]shared_resource_group_for_john.+7.+55(\.\d+)?%.+NORMAL.+\(id=\d+,.+user=john\)\s*shared_pool_john_and_jane
-- !result

show verbose resource groups all;
-- result:
[REGEX]shared_resource_group_for_jane.+8.+55(\.\d+)?%.+NORMAL.+\(id=\d+,.+user=jane\)\s*shared_pool_john_and_jane
-- !result


[UC] drop resource group shared_resource_group_for_john;
[UC] drop resource group shared_resource_group_for_jane;
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
-- name: test_create_two_resource_groups_with_mem_pool_different_mem_limit

[UC] drop resource group shared_resource_group_for_alex;
[UC] drop resource group shared_resource_group_for_brad;

[UC] create resource group shared_resource_group_for_alex
to (user='alex')
with (
'cpu_weight' = '7',
'mem_limit' = '55%',
'mem_pool' = 'shared_pool_for_alex_and_brad'
);

create resource group shared_resource_group_for_brad
to (user='brad')
with (
'cpu_weight' = '7',
'mem_limit' = '88%',
'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\]
-- !result

show verbose resource groups all;
-- result:
[REGEX]shared_resource_group_for_alex.+7.+55(\.\d+)?%.+NORMAL.+\(id=\d+,.+user=alex\)\s*(shared_pool_for_alex_and_brad)
-- !result

show verbose resource groups all;
-- result:
[REGEX][^shared_resource_group_for_brad]
-- !result


[UC] drop resource group shared_resource_group_for_alex;
[UC] drop resource group shared_resource_group_for_brad;
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
-- name: test_create_two_resource_groups_with_mem_pool_then_try_alter

[UC] drop resource group shared_resource_group_for_skywalker;
[UC] drop resource group shared_resource_group_for_vader;

[UC] create resource group shared_resource_group_for_skywalker
to (user='skywalker')
with (
'cpu_weight' = '2',
'mem_limit' = '70%',
'mem_pool' = 'shared_pool_skywalker_and_vader'
);


[UC] create resource group shared_resource_group_for_vader
to (user='vader')
with (
'cpu_weight' = '2',
'mem_limit' = '70%',
'mem_pool' = 'shared_pool_skywalker_and_vader'
);

show verbose resource groups all;
-- result:
[REGEX]shared_resource_group_for_skywalker.+2.+70(\.\d+)?%.+NORMAL.+\(id=\d+,.+user=skywalker\)\s*shared_pool_skywalker_and_vader
-- !result

show verbose resource groups all;
-- result:
[REGEX]shared_resource_group_for_vader.+2.+70(\.\d+)?%.+NORMAL.+\(id=\d+,.+user=vader\)\s*shared_pool_skywalker_and_vader
-- !result

alter resource group shared_resource_group_for_vader with (
'mem_limit' = '99%',
'mem_pool' = 'other_pool'
);
-- result:
E: (1064, 'Property `mem_pool` cannot be altered [shared_pool_skywalker_and_vader].')
-- !result

alter resource group shared_resource_group_for_skywalker with (
'mem_limit' = '99%',
'mem_pool' = 'other_pool'
);
-- result:
E: (1064, 'Property `mem_pool` cannot be altered [shared_pool_skywalker_and_vader].')
-- !result

[UC] drop resource group shared_resource_group_for_skywalker;
[UC] drop resource group shared_resource_group_for_vader;
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- name: test_create_resource_group_with_mem_pool

[UC] drop resource group shared_resource_group_for_test_user;

[UC] create resource group shared_resource_group_for_test_user
to (user='test_user')
with (
'cpu_weight' = '12',
'mem_limit' = '20%',
'mem_pool' = 'test_pool_1'
);

show verbose resource groups all;

[UC] drop resource group shared_resource_group_for_test_user;
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
-- name: test_create_resource_group_with_mem_pool_then_try_alter

[UC] drop resource group shared_resource_group_for_james;

[UC] create resource group shared_resource_group_for_james
to (user='james')
with (
'cpu_weight' = '9',
'mem_limit' = '66%',
'max_cpu_cores' = "8",
'mem_pool' = 'mem_pool_for_james'
);

show verbose resource groups all;

alter resource group shared_resource_group_for_james with (
'mem_limit' = '99%',
'mem_pool' = 'other_pool'
);

alter resource group shared_resource_group_for_james with (
'mem_limit' = '99%'
);

alter resource group shared_resource_group_for_james with (
'max_cpu_cores' = "1"
);

show verbose resource groups all;

[UC] drop resource group shared_resource_group_for_james;
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-- name: test_create_two_resource_groups_with_mem_pool

[UC] drop resource group shared_resource_group_for_john;
[UC] drop resource group shared_resource_group_for_jane;

[UC] create resource group shared_resource_group_for_john
to (user='john')
with (
'cpu_weight' = '7',
'mem_limit' = '55%',
'mem_pool' = 'shared_pool_john_and_jane'
);


[UC] create resource group shared_resource_group_for_jane
to (user='jane')
with (
'cpu_weight' = '8',
'mem_limit' = '55%',
'mem_pool' = 'shared_pool_john_and_jane'
);

show verbose resource groups all;
show verbose resource groups all;

[UC] drop resource group shared_resource_group_for_john;
[UC] drop resource group shared_resource_group_for_jane;
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
-- name: test_create_two_resource_groups_with_mem_pool_different_mem_limit

[UC] drop resource group shared_resource_group_for_alex;
[UC] drop resource group shared_resource_group_for_brad;

[UC] create resource group shared_resource_group_for_alex
to (user='alex')
with (
'cpu_weight' = '7',
'mem_limit' = '55%',
'mem_pool' = 'shared_pool_for_alex_and_brad'
);

create resource group shared_resource_group_for_brad
to (user='brad')
with (
'cpu_weight' = '7',
'mem_limit' = '88%',
'mem_pool' = 'shared_pool_for_alex_and_brad'
);

show verbose resource groups all;
show verbose resource groups all;

[UC] drop resource group shared_resource_group_for_alex;
[UC] drop resource group shared_resource_group_for_brad;
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
-- name: test_create_two_resource_groups_with_mem_pool_then_try_alter

[UC] drop resource group shared_resource_group_for_skywalker;
[UC] drop resource group shared_resource_group_for_vader;

[UC] create resource group shared_resource_group_for_skywalker
to (user='skywalker')
with (
'cpu_weight' = '2',
'mem_limit' = '70%',
'mem_pool' = 'shared_pool_skywalker_and_vader'
);


[UC] create resource group shared_resource_group_for_vader
to (user='vader')
with (
'cpu_weight' = '2',
'mem_limit' = '70%',
'mem_pool' = 'shared_pool_skywalker_and_vader'
);

show verbose resource groups all;

show verbose resource groups all;

alter resource group shared_resource_group_for_vader with (
'mem_limit' = '99%',
'mem_pool' = 'other_pool'
);

alter resource group shared_resource_group_for_skywalker with (
'mem_limit' = '99%',
'mem_pool' = 'other_pool'
);

[UC] drop resource group shared_resource_group_for_skywalker;
[UC] drop resource group shared_resource_group_for_vader;
Loading