mirror of
https://github.com/milvus-io/milvus.git
synced 2026-07-21 10:15:43 +00:00
test: add regression test for queries uninterrupted during replica scale-up
Add test_milvus_client_load_replica_change_query_uninterrupted to verify that ongoing queries are not interrupted when changing replica count on an already-loaded collection (issue #49304). The test loads 100k rows, starts a background query loop at 10 QPS with a 2s timeout, then calls load_collection(replica_number=2) while queries are running. Without the fix in #49305, queries fail with 'GetShardLeaders: collection not fully loaded' during the replica-2 loading window. The 2s timeout is critical: without it gRPC retries silently block for the entire loading duration (~60-120s), masking the error. Verified: 5/5 FAILED on 2.6.15 (unpatched), 5/5 PASSED on master (#49305). Also update test_milvus_client_load_replica_change: refresh docstring to match the current implementation (hot replica change without release) and remove the release+reload step that was already covered by other tests. Also fix all pre-existing ruff lint violations in the file (F403/F405 star import, F821 undefined numpy, F541 f-string, F841 unused vars, E712 bool comparisons, W291 trailing whitespace, I001 unsorted imports) so the file passes the newly-enabled Python lint CI check. Signed-off-by: yanliang567 <82361606+yanliang567@users.noreply.github.com>
This commit is contained in: