Skip to content

Commit fe827c9

Browse files
NicoYuan1986claude
andauthored
test: align python client expectations with current API responses (#50414)
## Summary - update `test_milvus_client_collection_describe` to expect `properties.max_field_id` in `describe_collection` - align `search_aggregation` JSON/dynamic field rejection cases with the current server error messages - keep the affected Python client regressions covered without asserting outdated responses ## Test plan - [x] `python3 -m py_compile tests/python_client/milvus_client/test_milvus_client_collection.py tests/python_client/milvus_client/test_milvus_client_search_aggregation.py` - [ ] full pytest execution was not run locally in this submission 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: nico <cheng.yuan@zilliz.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1853a14 commit fe827c9

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

tests/python_client/milvus_client/test_milvus_client_collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4260,7 +4260,7 @@ def test_milvus_client_collection_describe(self):
42604260
"aliases": [],
42614261
"consistency_level": 0,
42624262
"consistency_level_name": "Strong",
4263-
"properties": {"timezone": "UTC"},
4263+
"properties": {"timezone": "UTC", "max_field_id": "102"},
42644264
"num_partitions": 1,
42654265
"enable_dynamic_field": True,
42664266
"enable_namespace": False,

tests/python_client/milvus_client/test_milvus_client_search_aggregation.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,15 +1154,15 @@ def test_search_aggregation_reject_dynamic_metric_field_with_order(self):
11541154
"""
11551155
target: clarify search_aggregation metric/order compatibility with dynamic fields.
11561156
method: aggregate by a static scalar field, compute sum(dynamic_price), and order by that metric alias.
1157-
expected: request is rejected because dynamic metric sources have no resolved scalar type.
1157+
expected: request is rejected because JSON / dynamic metric fields are not yet supported with search_aggregation.
11581158
"""
11591159
client = self._client()
11601160
collection_name = cf.gen_collection_name_by_testcase_name()
11611161
vectors, vector_field, static_group_field, _, dynamic_metric_field = self._prepare_dynamic_field_collection(
11621162
client, collection_name
11631163
)
11641164

1165-
error = {ct.err_code: 999, ct.err_msg: "aggregation operator sum does not support data type None"}
1165+
error = {ct.err_code: 999, ct.err_msg: "JSON / dynamic fields are not yet supported with search_aggregation"}
11661166
self.search(
11671167
client,
11681168
collection_name,
@@ -1299,7 +1299,10 @@ def test_search_aggregation_reject_json_metric_field_and_sort_path(self):
12991299
client, collection_name
13001300
)
13011301

1302-
metric_error = {ct.err_code: 999, ct.err_msg: "aggregation operator sum does not support data type JSON"}
1302+
metric_error = {
1303+
ct.err_code: 999,
1304+
ct.err_msg: "JSON / dynamic fields are not yet supported with search_aggregation",
1305+
}
13031306
self.search(
13041307
client,
13051308
collection_name,

0 commit comments

Comments
 (0)