This is an automated email from the ASF dual-hosted git repository.
dataroaring 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 67e556af59b [regression](fe) Add more regression test for FE (#26206)
67e556af59b is described below
commit 67e556af59b8424ff72a9357d94b27fef0395a11
Author: Lei Zhang <[email protected]>
AuthorDate: Wed Nov 1 17:48:58 2023 +0800
[regression](fe) Add more regression test for FE (#26206)
* add add/drop node test
* add metrics test
* add meta_action test
---
.../suites/meta_action_p0/test_dump_image.groovy | 38 ++++++++++++++++++++
.../suites/metrics_p0/test_fe_metrics.groovy | 29 +++++++++++++++
regression-test/suites/node_p0/test_backend.groovy | 36 +++++++++++++++++++
regression-test/suites/node_p0/test_broker.groovy | 39 ++++++++++++++++++++
.../suites/node_p0/test_frontend.groovy | 42 ++++++++++++++++++++++
5 files changed, 184 insertions(+)
diff --git a/regression-test/suites/meta_action_p0/test_dump_image.groovy
b/regression-test/suites/meta_action_p0/test_dump_image.groovy
new file mode 100644
index 00000000000..ca36a6d012f
--- /dev/null
+++ b/regression-test/suites/meta_action_p0/test_dump_image.groovy
@@ -0,0 +1,38 @@
+// 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_dump_image") {
+ httpTest {
+ endpoint context.config.feHttpAddress
+ uri "/dump"
+ op "get"
+ check { code, body ->
+ logger.debug("code:${code} body:${body}");
+ assertEquals(200, code)
+
+ def bodyJson = parseJson(body)
+ assertEquals("success", bodyJson["msg"])
+ def dumpFilePath = bodyJson["data"]["dumpFilePath"]
+ logger.debug("dumpFilePath:${dumpFilePath}");
+ assertTrue(dumpFilePath.contains("image."))
+
+ File dumpFile = new File(dumpFilePath);
+ dumpFile.delete();
+ logger.info("dumpFile:${dumpFilePath} deleted");
+ }
+ }
+}
\ No newline at end of file
diff --git a/regression-test/suites/metrics_p0/test_fe_metrics.groovy
b/regression-test/suites/metrics_p0/test_fe_metrics.groovy
new file mode 100644
index 00000000000..7eeb633f417
--- /dev/null
+++ b/regression-test/suites/metrics_p0/test_fe_metrics.groovy
@@ -0,0 +1,29 @@
+// 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_fe_metrics") {
+ httpTest {
+ endpoint context.config.feHttpAddress
+ uri "/metrics"
+ op "get"
+ check { code, body ->
+ logger.debug("code:${code} body:${body}");
+ assertEquals(200, code)
+ assertTrue(body.contains("jvm_heap_size_bytes"))
+ }
+ }
+}
\ No newline at end of file
diff --git a/regression-test/suites/node_p0/test_backend.groovy
b/regression-test/suites/node_p0/test_backend.groovy
new file mode 100644
index 00000000000..30184fe7652
--- /dev/null
+++ b/regression-test/suites/node_p0/test_backend.groovy
@@ -0,0 +1,36 @@
+// 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_backend") {
+ def address = "127.0.0.1"
+ def notExistPort = 12346
+
+ for (int i = 0; i < 2; i++) {
+ def result = sql """SHOW BACKENDS;"""
+ logger.info("result:${result}")
+
+ sql """ALTER SYSTEM ADD BACKEND "${address}:${notExistPort}";"""
+
+ result = sql """SHOW BACKENDS;"""
+ logger.info("result:${result}")
+
+ sql """ALTER SYSTEM DROPP BACKEND "${address}:${notExistPort}";"""
+
+ result = sql """SHOW BACKENDS;"""
+ logger.info("result:${result}")
+ }
+}
\ No newline at end of file
diff --git a/regression-test/suites/node_p0/test_broker.groovy
b/regression-test/suites/node_p0/test_broker.groovy
new file mode 100644
index 00000000000..a02572066e7
--- /dev/null
+++ b/regression-test/suites/node_p0/test_broker.groovy
@@ -0,0 +1,39 @@
+// 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_broker") {
+ def address = "127.0.0.1"
+ def notExistPort = 12347
+
+ for (int i = 0; i < 2; i++) {
+ def result = sql """SHOW BROKER;"""
+ logger.info("result:${result}")
+
+ sql """ALTER SYSTEM ADD BROKER broker1 "${address}:${notExistPort}";"""
+
+ result = sql """SHOW BROKER;"""
+ logger.info("result:${result}")
+
+ sql """ALTER SYSTEM DROP BROKER broker1
"${address}:${notExistPort}";"""
+
+ result = sql """SHOW BROKER;"""
+ logger.info("result:${result}")
+ }
+
+ sql """ALTER SYSTEM ADD BROKER broker1 "${address}:${notExistPort}";"""
+ sql """ALTER SYSTEM DROP ALL BROKER broker1;"""
+}
\ No newline at end of file
diff --git a/regression-test/suites/node_p0/test_frontend.groovy
b/regression-test/suites/node_p0/test_frontend.groovy
new file mode 100644
index 00000000000..3826a0d7b2f
--- /dev/null
+++ b/regression-test/suites/node_p0/test_frontend.groovy
@@ -0,0 +1,42 @@
+// 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_frontend") {
+ def address = "127.0.0.1"
+ def notExistPort = 12345
+
+ for (int i = 0; i < 2; i++) {
+ def result = sql """SHOW FRONTENDS;"""
+ logger.debug("result:${result}")
+
+ sql """ALTER SYSTEM ADD FOLLOWER "${address}:${notExistPort}";"""
+ result = sql """SHOW FRONTENDS;"""
+ logger.debug("result:${result}")
+
+ sql """ALTER SYSTEM DROP FOLLOWER "${address}:${notExistPort}";"""
+ result = sql """SHOW FRONTENDS;"""
+ logger.debug("result:${result}")
+
+ sql """ALTER SYSTEM ADD OBSERVER "${address}:${notExistPort}";"""
+ result = sql """SHOW FRONTENDS;"""
+ logger.debug("result:${result}")
+
+ sql """ALTER SYSTEM DROP OBSERVER "${address}:${notExistPort}";"""
+ result = sql """SHOW FRONTENDS;"""
+ logger.debug("result:${result}")
+ }
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]