citus
citus copied to clipboard
Fix flaky test citus_split_shard_columnar_partitioned
The order of the last two rows on a table can change, and this creates a flaky test. I suggest you add an order on nodeport to make the results deterministic in these cases.
Originally posted by @hanefi in https://github.com/citusdata/citus/pull/6067#discussion_r936922972
Here is the failure diff on my local:
diff --git a/src/test/regress/expected/citus_split_shard_columnar_partitioned.out b/src/test/regress/expected/citus_split_shard_columnar_partitioned.out
index b1cebc392..5a599231e 100644
--- a/src/test/regress/expected/citus_split_shard_columnar_partitioned.out
+++ b/src/test/regress/expected/citus_split_shard_columnar_partitioned.out
@@ -556,8 +556,8 @@ SET citus.shard_replication_factor TO 1;
8999120 | colocated_partitioned_table_2020_01_01 | -2147483648 | -2127770000 | localhost | 57637
8999121 | colocated_partitioned_table_2020_01_01 | -2127769999 | -2120000000 | localhost | 57638
8999021 | colocated_partitioned_table_2020_01_01 | -2119999999 | 2147483647 | localhost | 57638
- 8970011 | reference_table | | | localhost | 57637
8970011 | reference_table | | | localhost | 57638
+ 8970011 | reference_table | | | localhost | 57637
(35 rows)
SELECT count(*) FROM reference_table;
Probably not applicable anymore as we don't see any more occurrences of them.