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
6 changes: 6 additions & 0 deletions regression-test/data/workload_manager_p0/test_check_wg.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !select_wg --
normal
upgrade_g1
upgrade_g2

33 changes: 33 additions & 0 deletions regression-test/suites/workload_manager_p0/load.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
suite("test_create_upgrade_wg") {
sql "ADMIN SET FRONTEND CONFIG ('enable_workload_group' = 'true');"

sql "create workload group if not exists upgrade_g1 " +
"properties ( " +
" 'cpu_share'='11', " +
" 'memory_limit'='0.2%', " +
" 'enable_memory_overcommit'='true' " +
");"

sql "create workload group if not exists upgrade_g2 " +
"properties ( " +
" 'cpu_share'='12', " +
" 'memory_limit'='0.3%', " +
" 'enable_memory_overcommit'='true' " +
");"
}
19 changes: 19 additions & 0 deletions regression-test/suites/workload_manager_p0/test_check_wg.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
suite("test_check_wg") {
qt_select_wg "select name from information_schema.workload_groups where name in ('upgrade_g1','normal','upgrade_g2');"
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ suite("test_crud_wlg") {
sql "ADMIN SET FRONTEND CONFIG ('enable_alter_queue_prop_sync' = 'true');"
sql "ADMIN SET FRONTEND CONFIG ('query_queue_update_interval_ms' = '100');"

sql "create workload group if not exists normal " +
"properties ( " +
" 'cpu_share'='1024', " +
" 'memory_limit'='50%', " +
" 'enable_memory_overcommit'='true' " +
");"

// reset normal group property
sql "alter workload group normal properties ( 'cpu_share'='1024' );"
sql "alter workload group normal properties ( 'memory_limit'='50%' );"
Expand Down