Skip to content
Snippets Groups Projects
Commit 8dda6a9f authored by Kurdakov Alexander's avatar Kurdakov Alexander
Browse files

test: expel offline instance works

parent 7156a7a1
No related branches found
No related tags found
1 merge request!1318test: expel offline instance works
Pipeline #51679 passed
......@@ -108,3 +108,32 @@ def test_raft_id_after_expel(cluster: Cluster):
i4 = cluster.add_instance()
assert i4.raft_id == 4
def test_expelled_instance_is_not_offline(cluster: Cluster):
cluster.deploy(instance_count=2)
# second instance just for quorum
i1, _ = cluster.instances
ddl = i1.sql(
"""
CREATE TABLE "testing_space" ( "id" INTEGER NOT NULL, PRIMARY KEY ("id") )
DISTRIBUTED BY ("id")
"""
)
assert ddl["row_count"] == 1
response = i1.sql(
"INSERT INTO testing_space VALUES " + ", ".join([f"({i})" for i in range(1000)])
)
assert response["row_count"] == 1000
i3 = cluster.add_instance()
cluster.wait_until_instance_has_this_many_active_buckets(i3, 1000)
i3.kill()
cluster.expel(i3, peer=i1)
Retriable(timeout=10).call(lambda: assert_instance_expelled(i3, i1))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment