This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push: new 22ad6efac10 branch-3.0: [regression-test](fix) fix alter_p2 case bug #46885 (#46892) 22ad6efac10 is described below commit 22ad6efac10eba835de23cec1bd117a9dfb457c4 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Mon Jan 13 21:28:52 2025 +0800 branch-3.0: [regression-test](fix) fix alter_p2 case bug #46885 (#46892) Cherry-picked from #46885 Co-authored-by: shuke <sh...@selectdb.com> --- .../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: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org