mirror of https://github.com/citusdata/citus.git
Fix the flaky test in clock.sql
parent
989a3b54c9
commit
cbb33167f9
|
@ -252,11 +252,12 @@ DETAIL: Key (cc)=((100,100)) already exists.
|
||||||
--
|
--
|
||||||
SELECT (extract(epoch from now()) * 1000)::bigint AS epoch,
|
SELECT (extract(epoch from now()) * 1000)::bigint AS epoch,
|
||||||
citus_get_node_clock() AS latest_clock \gset
|
citus_get_node_clock() AS latest_clock \gset
|
||||||
-- Returns true
|
-- Returns difference in epoch-milliseconds
|
||||||
SELECT ABS(:epoch - cluster_clock_logical(:'latest_clock')) < 25;
|
SELECT CASE WHEN msdiff BETWEEN 0 AND 25 THEN 0 ELSE msdiff END
|
||||||
?column?
|
FROM ABS(:epoch - cluster_clock_logical(:'latest_clock')) msdiff;
|
||||||
|
msdiff
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
t
|
0
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
|
|
@ -81,7 +81,7 @@ test: multi_reference_table multi_select_for_update relation_access_tracking pg1
|
||||||
test: custom_aggregate_support aggregate_support tdigest_aggregate_support
|
test: custom_aggregate_support aggregate_support tdigest_aggregate_support
|
||||||
test: multi_average_expression multi_working_columns multi_having_pushdown having_subquery
|
test: multi_average_expression multi_working_columns multi_having_pushdown having_subquery
|
||||||
test: multi_array_agg multi_limit_clause multi_orderby_limit_pushdown
|
test: multi_array_agg multi_limit_clause multi_orderby_limit_pushdown
|
||||||
test: multi_jsonb_agg multi_jsonb_object_agg multi_json_agg multi_json_object_agg bool_agg ch_bench_having chbenchmark_all_queries expression_reference_join anonymous_columns clock
|
test: multi_jsonb_agg multi_jsonb_object_agg multi_json_agg multi_json_object_agg bool_agg ch_bench_having chbenchmark_all_queries expression_reference_join anonymous_columns
|
||||||
test: ch_bench_subquery_repartition
|
test: ch_bench_subquery_repartition
|
||||||
test: multi_agg_type_conversion multi_count_type_conversion recursive_relation_planning_restriction_pushdown
|
test: multi_agg_type_conversion multi_count_type_conversion recursive_relation_planning_restriction_pushdown
|
||||||
test: multi_partition_pruning single_hash_repartition_join unsupported_lateral_subqueries
|
test: multi_partition_pruning single_hash_repartition_join unsupported_lateral_subqueries
|
||||||
|
@ -101,6 +101,8 @@ test: undistribute_table
|
||||||
test: run_command_on_all_nodes
|
test: run_command_on_all_nodes
|
||||||
test: background_task_queue_monitor
|
test: background_task_queue_monitor
|
||||||
|
|
||||||
|
# Causal clock test
|
||||||
|
test: clock
|
||||||
|
|
||||||
# ---------
|
# ---------
|
||||||
# test that no tests leaked intermediate results. This should always be last
|
# test that no tests leaked intermediate results. This should always be last
|
||||||
|
|
|
@ -98,8 +98,9 @@ INSERT INTO cluster_clock_type values('(100, 100)');
|
||||||
SELECT (extract(epoch from now()) * 1000)::bigint AS epoch,
|
SELECT (extract(epoch from now()) * 1000)::bigint AS epoch,
|
||||||
citus_get_node_clock() AS latest_clock \gset
|
citus_get_node_clock() AS latest_clock \gset
|
||||||
|
|
||||||
-- Returns true
|
-- Returns difference in epoch-milliseconds
|
||||||
SELECT ABS(:epoch - cluster_clock_logical(:'latest_clock')) < 25;
|
SELECT CASE WHEN msdiff BETWEEN 0 AND 25 THEN 0 ELSE msdiff END
|
||||||
|
FROM ABS(:epoch - cluster_clock_logical(:'latest_clock')) msdiff;
|
||||||
|
|
||||||
BEGIN;
|
BEGIN;
|
||||||
SELECT citus_get_transaction_clock();
|
SELECT citus_get_transaction_clock();
|
||||||
|
|
Loading…
Reference in New Issue