test: stabilize test_rejoin_cluster collection create under CI load

The critical test_collection2 create still used a 3s consensus timeout
meant only for the log-accumulation loops. Under CI load that timeout
returns 500 even when the op commits, failing the test. Use the default
timeout and wait for living peers before restarting the dead node.
This commit is contained in:
qdrant-cloud-bot
2026-08-21 15:37:34 +00:00
parent b88becd3b5
commit 97eb4945cd
+5 -2
View File
@@ -50,14 +50,17 @@ def test_rejoin_cluster(tmp_path: pathlib.Path, uris_in_env):
res = requests.get(f"{peer_api_uris[1]}/collections")
print(res.json())
# Create new collection unknown to the dead node
# Create new collection unknown to the dead node. Unlike the log-accumulation
# loops above, this create must succeed before we restart the peer — do not use
# the tight 3s timeout (CI load can exceed it even though consensus commits).
create_collection(
peer_api_uris[0],
"test_collection2",
shard_number=N_SHARDS,
replication_factor=N_REPLICA,
timeout=3
)
# Wait until living peers have applied the create before restarting the dead one.
wait_collection_on_all_peers("test_collection2", peer_api_uris[:-1])
# Restart last node
new_url = start_peer(peer_dirs[-1], "peer_0_restarted.log", bootstrap_uri, uris_in_env=uris_in_env)