mirror of
https://github.com/qdrant/qdrant.git
synced 2026-09-21 13:37:46 -05:00
test: fix flaky test_partial_snapshot_empty (#9493)
The test asserts that creating a partial snapshot between two in-sync peers returns 304 (empty diff). It only waited for the write peer to become green, but read the read peer's manifest for the comparison. An async optimization reshaping the read peer's segments after collection-snapshot recovery makes its manifest diverge from the write peer's files, producing 200 instead of 304 (assert 200 == 304). Wait for the read peer to become green as well before comparing manifests, mirroring the earlier flaky-test fixes (#7358, #7360). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
80d378b896
commit
5bcc420073
@@ -134,6 +134,11 @@ def test_partial_snapshot_empty(tmp_path: pathlib.Path):
|
||||
|
||||
write_peer, read_peer = bootstrap_peers(tmp_path, bootstrap_points = 1000, recover_read= True, wait_for_green = True)
|
||||
|
||||
# Wait for the read peer to settle too: an async optimization reshaping its
|
||||
# segments after recovery would make its manifest diverge from the write
|
||||
# peer's files, turning the expected empty (304) partial snapshot into a 200.
|
||||
wait_collection_green(read_peer, COLLECTION)
|
||||
|
||||
# Collection snapshot doesn't affect partial snapshot recovery timestamp
|
||||
recovery_ts = get_telemetry_collections(read_peer)[0]['shards'][0]['partial_snapshot']['recovery_timestamp']
|
||||
assert recovery_ts == 0
|
||||
|
||||
Reference in New Issue
Block a user