mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 17:48:29 +08:00
The tests were failing with "grpc: Server.RegisterService after Server.Serve" because setupMockServer() was starting the gRPC server before tests could register their services. gRPC requires all services to be registered before Server.Serve() is called. Changes: - Remove s.Serve() from setupMockServer() helper function - Add s.Serve() to each test after service registration - Apply fix consistently to all 6 affected tests: * TestZillizClient_Embedding * TestZillizClient_Embedding_Error * TestZillizClient_Rerank * TestZillizClient_Rerank_Error * TestNewZilliClient_WithMockServer * TestZillizClient_Embedding_EmptyResponse This follows the correct gRPC server lifecycle: 1. Create server 2. Register services 3. Start serving Related to #44620 Case: "internal/util/function/models/zilliz TestZillizClient_Rerank" Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>