Modified the shard_count

pull/7013/head
Shabnam Khan 2023-06-28 13:47:28 +05:30
parent 63213b19dd
commit 54a007d6a1
1 changed files with 3 additions and 4 deletions

View File

@ -6,7 +6,7 @@ def test_isolate(cluster):
cluster.coordinator.restart()
cluster.coordinator.sql("SET citus.split_shard_group_size_threshold to 100")
cluster.coordinator.sql("CREATE TABLE test_row(i integer)")
cluster.coordinator.sql("SELECT create_distributed_table('test_row','i')")
cluster.coordinator.sql("SELECT create_distributed_table('test_row','i',shard_count:=1)")
cluster.coordinator.sql("INSERT INTO test_row SELECT 1 from generate_series(1,20000) ")
row_count1 = cluster.coordinator.sql_value("SELECT count(*) FROM pg_dist_shard")
@ -25,9 +25,8 @@ def test_split(cluster):
cluster.coordinator.restart()
cluster.coordinator.sql("SET citus.split_shard_group_size_threshold to 100")
cluster.coordinator.sql("SET citus.shard_count to 1")
cluster.coordinator.sql("CREATE TABLE test_row(i integer)")
cluster.coordinator.sql("SELECT create_distributed_table('test_row','i')")
cluster.coordinator.sql("SELECT create_distributed_table('test_row','i',shard_count:=1)")
cluster.coordinator.sql("INSERT INTO test_row SELECT generate_series(1,20000) ")
row_count1 = cluster.coordinator.sql_value("SELECT count(*) FROM pg_dist_shard")
@ -39,4 +38,4 @@ def test_split(cluster):
row_count2 = cluster.coordinator.sql_value("SELECT count(*) FROM pg_dist_shard")
assert row_count2>row_count1, "Shard didn't get split"
assert row_count2==row_count1+1, "Shard didn't get split"