This is an automated email from the ASF dual-hosted git repository. wangbo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new f41588b7c10 [Fix]remove useless workload group test (#46147) f41588b7c10 is described below commit f41588b7c101fa6b0bbed311aa38db8c76a66164 Author: wangbo <wan...@selectdb.com> AuthorDate: Mon Dec 30 15:19:34 2024 +0800 [Fix]remove useless workload group test (#46147) --- .../auth_call/test_ddl_workload_group_auth.groovy | 86 ---------------------- .../test_nereids_workload_alter_test.groovy | 25 ------- .../test_nereids_workload_policy_test.groovy | 32 -------- .../test_nereids_workload_test.groovy | 27 ------- .../test_nereids_workloadpolicy_alter_test.groovy | 32 -------- 5 files changed, 202 deletions(-) diff --git a/regression-test/suites/auth_call/test_ddl_workload_group_auth.groovy b/regression-test/suites/auth_call/test_ddl_workload_group_auth.groovy deleted file mode 100644 index 32589515c6b..00000000000 --- a/regression-test/suites/auth_call/test_ddl_workload_group_auth.groovy +++ /dev/null @@ -1,86 +0,0 @@ -// 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. - -import org.junit.Assert; - -suite("test_ddl_workload_group_auth","p0,auth_call") { - String user = 'test_ddl_wg_auth_user' - String pwd = 'C123_567p' - String dbName = 'test_ddl_wg_auth_db' - String workloadGroupName = 'test_ddl_wg_auth_wg' - - //cloud-mode - if (isCloudMode()) { - def clusters = sql " SHOW CLUSTERS; " - assertTrue(!clusters.isEmpty()) - def validCluster = clusters[0][0] - sql """GRANT USAGE_PRIV ON CLUSTER ${validCluster} TO ${user}"""; - } - - try_sql("DROP USER ${user}") - try_sql """drop database if exists ${dbName}""" - try_sql("""drop workload group if exists ${workloadGroupName};""") - sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" - sql """grant select_priv on regression_test to ${user}""" - sql """create database ${dbName}""" - - // ddl create,show,drop - connect(user, "${pwd}", context.config.jdbcUrl) { - test { - sql """CREATE WORKLOAD GROUP "${workloadGroupName}" - PROPERTIES ( - "cpu_share"="10" - );""" - exception "denied" - } - test { - sql """alter workload group ${workloadGroupName} - properties ( - "cpu_share"="20" - );""" - exception "denied" - } - - def res = sql """show workload groups like '${workloadGroupName}'""" - assertTrue(res.size() == 0) - - test { - sql """drop workload group if exists ${workloadGroupName};""" - exception "denied" - } - } - sql """grant admin_priv on *.*.* to ${user}""" - connect(user, "${pwd}", context.config.jdbcUrl) { - sql """CREATE WORKLOAD GROUP "${workloadGroupName}" - PROPERTIES ( - "cpu_share"="10" - );""" - def res = sql """show workload groups like '${workloadGroupName}'""" - assertTrue(res.size() > 0) - sql """alter workload group ${workloadGroupName} - properties ( - "cpu_share"="20" - );""" - sql """drop workload group if exists ${workloadGroupName};""" - res = sql """show workload groups like '${workloadGroupName}'""" - assertTrue(res.size() == 0) - } - - try_sql("""drop workload group if exists ${workloadGroupName};""") - sql """drop database if exists ${dbName}""" - try_sql("DROP USER ${user}") -} diff --git a/regression-test/suites/workload_manager_p0/test_nereids_workload_alter_test.groovy b/regression-test/suites/workload_manager_p0/test_nereids_workload_alter_test.groovy deleted file mode 100644 index b3f600b3f18..00000000000 --- a/regression-test/suites/workload_manager_p0/test_nereids_workload_alter_test.groovy +++ /dev/null @@ -1,25 +0,0 @@ -// 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_nereids_workload_test") { - sql "drop workload group if exists test_nereids_alter_wg1;" - sql "create workload group test_nereids_alter_wg1 properties('cpu_share'='1024', 'scan_thread_num'='10');" - qt_check_workload_check1("select CPU_SHARE,scan_thread_num from information_schema.workload_groups where NAME='test_nereids_alter_wg1';") - checkNereidsExecute("Alter workload group test_nereids_alter_wg1 properties('cpu_share'='20', 'scan_thread_num'='8');") - qt_check_workload_check2("select CPU_SHARE,scan_thread_num from information_schema.workload_groups where NAME='test_nereids_alter_wg1';") - checkNereidsExecute("drop workload group if exists test_nereids_alter_wg1;") -} \ No newline at end of file diff --git a/regression-test/suites/workload_manager_p0/test_nereids_workload_policy_test.groovy b/regression-test/suites/workload_manager_p0/test_nereids_workload_policy_test.groovy deleted file mode 100644 index c3b93f9ffa2..00000000000 --- a/regression-test/suites/workload_manager_p0/test_nereids_workload_policy_test.groovy +++ /dev/null @@ -1,32 +0,0 @@ -// 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_nereids_workload_policy_test") { - sql "drop workload policy if exists test_nereids_worklod_policy1;" - sql "create workload policy test_nereids_worklod_policy1 " + - "conditions(username='root') " + - "actions(set_session_variable 'workload_group=normal') " + - "properties( " + - "'enabled' = 'false', " + - "'priority'='10' " + - ");" - qt_check_workload_policy_check1("select NAME from information_schema.workload_policy where NAME='test_nereids_worklod_policy1';") - checkNereidsExecute("drop workload policy test_nereids_worklod_policy1;") - checkNereidsExecute("drop workload policy if exists test_nereids_worklod_policy1;") - qt_check_workload_policy_check2("select NAME from information_schema.workload_policy where NAME='test_nereids_worklod_policy1';") - -} \ No newline at end of file diff --git a/regression-test/suites/workload_manager_p0/test_nereids_workload_test.groovy b/regression-test/suites/workload_manager_p0/test_nereids_workload_test.groovy deleted file mode 100644 index 680f5a28ca9..00000000000 --- a/regression-test/suites/workload_manager_p0/test_nereids_workload_test.groovy +++ /dev/null @@ -1,27 +0,0 @@ -// 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_nereids_workload_test") { - sql "drop workload group if exists test_nereids_wg1;" - sql "drop workload group if exists test_nereids_wg2;" - checkNereidsExecute("create workload group test_nereids_wg1 properties('cpu_share'='1024');") - checkNereidsExecute("create workload group test_nereids_wg2 properties('cpu_share'='1024');") - qt_check_workload_check1("select NAME from information_schema.workload_groups where NAME='test_nereids_wg1';") - checkNereidsExecute("drop workload group test_nereids_wg1;") - qt_check_workload_check2("select NAME from information_schema.workload_groups where NAME='test_nereids_wg1';") - checkNereidsExecute("drop workload group if exists test_nereids_wg2;") -} diff --git a/regression-test/suites/workload_manager_p0/test_nereids_workloadpolicy_alter_test.groovy b/regression-test/suites/workload_manager_p0/test_nereids_workloadpolicy_alter_test.groovy deleted file mode 100644 index e696f09587f..00000000000 --- a/regression-test/suites/workload_manager_p0/test_nereids_workloadpolicy_alter_test.groovy +++ /dev/null @@ -1,32 +0,0 @@ -// 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_nereids_workloadpolicy_alter_test") { - sql "drop workload policy if exists test_nereids_alter_worklod_policy1;" - sql "create workload policy test_nereids_alter_worklod_policy1 " + - "conditions(username='root') " + - "actions(set_session_variable 'workload_group=normal') " + - "properties( " + - "'enabled' = 'false', " + - "'priority'='10');" - - qt_check_workload_policy_check1("select NAME,PRIORITY from information_schema.workload_policy where NAME='test_nereids_alter_worklod_policy1';") - checkNereidsExecute("alter workload policy test_nereids_alter_worklod_policy1 properties('priority'='17');") - qt_check_workload_policy_check2("select NAME,PRIORITY from information_schema.workload_policy where NAME='test_nereids_alter_worklod_policy1';") - sql "drop workload policy if exists test_nereids_alter_worklod_policy1;" - -} \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org