diff --git a/regression-test/suites/compaction/test_mow_compaction_agg_and_remove_pre_delete_bitmap.groovy b/regression-test/suites/compaction/test_mow_compaction_agg_and_remove_pre_delete_bitmap.groovy index 0c0fda5d1c2991..62167d545f6889 100644 --- a/regression-test/suites/compaction/test_mow_compaction_agg_and_remove_pre_delete_bitmap.groovy +++ b/regression-test/suites/compaction/test_mow_compaction_agg_and_remove_pre_delete_bitmap.groovy @@ -191,7 +191,9 @@ suite("test_mow_compaction_agg_and_remove_pre_delete_bitmap", "nonConcurrent") { def tablets = sql_return_maparray """ show tablets from ${testTable}; """ logger.info("tablets: " + tablets) - assertEquals(1, tablets.size()) + // BUCKETS 1 => exactly one tablet; the cluster may create multiple replicas, + // so show tablets returns one row per replica. Assert by distinct tablet id. + assertEquals(1, tablets.collect { it.TabletId }.unique().size()) def tablet = tablets[0] // 1. write some data @@ -278,7 +280,9 @@ suite("test_mow_compaction_agg_and_remove_pre_delete_bitmap", "nonConcurrent") { tablets = sql_return_maparray """ show tablets from ${testTable}; """ logger.info("tablets: " + tablets) - assertEquals(1, tablets.size()) + // BUCKETS 1 => exactly one tablet; the cluster may create multiple replicas, + // so show tablets returns one row per replica. Assert by distinct tablet id. + assertEquals(1, tablets.collect { it.TabletId }.unique().size()) tablet = tablets[0] // 1. write some data diff --git a/regression-test/suites/compaction/test_mow_compaction_and_read_stale.groovy b/regression-test/suites/compaction/test_mow_compaction_and_read_stale.groovy index bfd1a41cf36502..ef9047c3a1bdf5 100644 --- a/regression-test/suites/compaction/test_mow_compaction_and_read_stale.groovy +++ b/regression-test/suites/compaction/test_mow_compaction_and_read_stale.groovy @@ -203,7 +203,9 @@ suite("test_mow_compaction_and_read_stale", "nonConcurrent") { def tablets = sql_return_maparray """ show tablets from ${testTable}; """ logger.info("tablets: " + tablets) - assertEquals(1, tablets.size()) + // BUCKETS 1 => exactly one tablet; the cluster may create multiple replicas, + // so show tablets returns one row per replica. Assert by distinct tablet id. + assertEquals(1, tablets.collect { it.TabletId }.unique().size()) def tablet = tablets[0] String tablet_id = tablet.TabletId diff --git a/regression-test/suites/compaction/test_mow_compaction_and_schema_change.groovy b/regression-test/suites/compaction/test_mow_compaction_and_schema_change.groovy index 5c4dbbedd3fff5..b248c9370f46d1 100644 --- a/regression-test/suites/compaction/test_mow_compaction_and_schema_change.groovy +++ b/regression-test/suites/compaction/test_mow_compaction_and_schema_change.groovy @@ -216,7 +216,9 @@ suite("test_mow_compaction_and_schema_change", "nonConcurrent") { def tablets = sql_return_maparray """ show tablets from ${testTable}; """ logger.info("tablets: " + tablets) - assertEquals(1, tablets.size()) + // BUCKETS 1 => exactly one tablet; the cluster may create multiple replicas, + // so show tablets returns one row per replica. Assert by distinct tablet id. + assertEquals(1, tablets.collect { it.TabletId }.unique().size()) def tablet = tablets[0] // 1. write some data