From e0f58b1ca118f30ec70415e4c124b7a3d2ee1556 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Wed, 22 Apr 2020 01:45:51 +0300 Subject: [PATCH] Cover fallback_to_stale_replicas in conjunction with skip_unavailable_shards --- tests/integration/test_delayed_replica_failover/test.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/integration/test_delayed_replica_failover/test.py b/tests/integration/test_delayed_replica_failover/test.py index 58734b2c39b..66a3a9e1a34 100644 --- a/tests/integration/test_delayed_replica_failover/test.py +++ b/tests/integration/test_delayed_replica_failover/test.py @@ -81,6 +81,14 @@ SELECT sum(x) FROM distributed SETTINGS max_replica_delay_for_distributed_queries=1 ''').strip() == '3' + # Regression for skip_unavailable_shards in conjunction with skip_unavailable_shards + assert instance_with_dist_table.query(''' +SELECT sum(x) FROM distributed SETTINGS + load_balancing='in_order', + skip_unavailable_shards=1, + max_replica_delay_for_distributed_queries=1 +''').strip() == '3' + # If we forbid stale replicas, the query must fail. with pytest.raises(Exception): print instance_with_dist_table.query('''