From 2f32ed2bccdaf622101ba21c41fc60b07489e209 Mon Sep 17 00:00:00 2001 From: shuke Date: Mon, 13 Jan 2025 11:20:10 +0800 Subject: [PATCH] =?UTF-8?q?[regression-test](fix)=20fix=20test=5Fshow=5Fta?= =?UTF-8?q?blet.groovy=20bug=20running=20on=20mul=E2=80=A6=20(#46860)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../suites/show_p0/test_show_tablet.groovy | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/regression-test/suites/show_p0/test_show_tablet.groovy b/regression-test/suites/show_p0/test_show_tablet.groovy index 99a1e19136..024e90fdd1 100644 --- a/regression-test/suites/show_p0/test_show_tablet.groovy +++ b/regression-test/suites/show_p0/test_show_tablet.groovy @@ -25,12 +25,32 @@ suite("test_show_tablet") { PROPERTIES ( "replication_num" = "1" );""" - def res = sql """SHOW TABLETS FROM show_tablets_test_t limit 5, 1;""" - assertTrue(res.size() == 0) - res = sql """SHOW TABLETS FROM show_tablets_test_t limit 3, 5;""" - assertTrue(res.size() == 2) + def res = sql """ SHOW TABLETS FROM show_tablets_test_t """ + if (res.size() == 5) { + // replication num == 1 + res = sql """SHOW TABLETS FROM show_tablets_test_t limit 5, 1;""" + logger.info("result: " + res.toString()); + assertTrue(res.size() == 0) - res = sql """SHOW TABLETS FROM show_tablets_test_t limit 10;""" - assertTrue(res.size() == 5) + res = sql """SHOW TABLETS FROM show_tablets_test_t limit 3, 5;""" + assertTrue(res.size() == 2) + + res = sql """SHOW TABLETS FROM show_tablets_test_t limit 10;""" + assertTrue(res.size() == 5) + } else if (res.size() == 15) { + // in multi-be cluster and force_olap_table_replication_num=3 + // will change to 3 replication even though set "replication_num" = "1" in create table + res = sql """SHOW TABLETS FROM show_tablets_test_t limit 15, 1;""" + logger.info("result: " + res.toString()); + assertTrue(res.size() == 0) + + res = sql """SHOW TABLETS FROM show_tablets_test_t limit 13, 5;""" + assertTrue(res.size() == 2) + + res = sql """SHOW TABLETS FROM show_tablets_test_t limit 15;""" + assertTrue(res.size() == 15) + } else { + assertTrue(1 == 2) + } } \ No newline at end of file