This is an automated email from the ASF dual-hosted git repository.
yiguolei 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 fd8fa680cbd [regression-test](fix) fix alter_p2 case bug (#46885)
fd8fa680cbd is described below
commit fd8fa680cbdd4547f3274afdb9c416f8bcb9bde3
Author: shuke <[email protected]>
AuthorDate: Mon Jan 13 15:36:08 2025 +0800
[regression-test](fix) fix alter_p2 case bug (#46885)
---
.../alter_p2/test_alter_table_property.groovy | 23 +++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/regression-test/suites/alter_p2/test_alter_table_property.groovy
b/regression-test/suites/alter_p2/test_alter_table_property.groovy
index bdc2a8ac01c..5ad017f276c 100644
--- a/regression-test/suites/alter_p2/test_alter_table_property.groovy
+++ b/regression-test/suites/alter_p2/test_alter_table_property.groovy
@@ -16,6 +16,10 @@
// under the License.
suite ("test_alter_table_property") {
+ if (isCloudMode()) {
+ return
+ }
+
String tableName = "test_alter_table_property_table"
sql "DROP TABLE IF EXISTS ${tableName}"
sql """
@@ -57,21 +61,22 @@ suite ("test_alter_table_property") {
sql """ ALTER TABLE ${tableName} ADD PARTITION p2 VALUES LESS THAN ("200")
"""
assertEquals(replication_num, queryReplicaCount("p2"))
- if (!isCloudMode()) {
- sql """ ALTER TABLE ${tableName} SET (
"default.replication_allocation" = "tag.location.default: 2" ) """
+ def res = sql """show backends;"""
+ if (res.size() < 3) {
+ return
}
+
+ sql """ ALTER TABLE ${tableName} SET ( "default.replication_allocation" =
"tag.location.default: 2" ) """
sql """ ALTER TABLE ${tableName} ADD PARTITION p3 VALUES LESS THAN ("300")
"""
assertEquals(2, queryReplicaCount("p3"))
- if (!isCloudMode()) {
- sql """ ALTER TABLE ${tableName} MODIFY PARTITION p1 SET (
"replication_allocation" = "tag.location.default: 2" ) """
- for (i = 0; i < 300; i++) {
- if (queryReplicaCount("p1") != 2) {
- Thread.sleep(3000)
- }
+ sql """ ALTER TABLE ${tableName} MODIFY PARTITION p1 SET (
"replication_allocation" = "tag.location.default: 2" ) """
+ for (i = 0; i < 300; i++) {
+ if (queryReplicaCount("p1") != 2) {
+ Thread.sleep(3000)
}
- assertEquals(2, queryReplicaCount("p1"))
}
+ assertEquals(2, queryReplicaCount("p1"))
assertEquals(replication_num, queryReplicaCount("p2"))
sql "DROP TABLE ${tableName}"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]