diff --git a/internal/querycoordv2/services_test.go b/internal/querycoordv2/services_test.go index 1381bc2a23b51..77195dce5cd08 100644 --- a/internal/querycoordv2/services_test.go +++ b/internal/querycoordv2/services_test.go @@ -857,58 +857,6 @@ func (suite *ServiceSuite) TestTransferReplica() { suite.ErrorIs(merr.Error(resp), merr.ErrServiceNotReady) } -func (suite *ServiceSuite) TestLoadCollectionFailed() { - suite.loadAll() - ctx := context.Background() - server := suite.server - - // Test load with different replica number - for _, collection := range suite.collections { - req := &querypb.LoadCollectionRequest{ - CollectionID: collection, - ReplicaNumber: suite.replicaNumber[collection] + 1, - } - resp, err := server.LoadCollection(ctx, req) - suite.NoError(err) - suite.ErrorIs(merr.Error(resp), merr.ErrParameterInvalid) - } - - req := &querypb.LoadCollectionRequest{ - CollectionID: 1001, - ReplicaNumber: 2, - ResourceGroups: []string{meta.DefaultResourceGroupName, "rg"}, - } - resp, err := server.LoadCollection(ctx, req) - suite.NoError(err) - suite.Equal(commonpb.ErrorCode_IllegalArgument, resp.ErrorCode) - - // Test load with partitions loaded - for _, collection := range suite.collections { - if suite.loadTypes[collection] != querypb.LoadType_LoadPartition { - continue - } - - req := &querypb.LoadCollectionRequest{ - CollectionID: collection, - } - resp, err := server.LoadCollection(ctx, req) - suite.NoError(err) - suite.Equal(commonpb.ErrorCode_IllegalArgument, resp.ErrorCode) - } - - // Test load with wrong rg num - for _, collection := range suite.collections { - req := &querypb.LoadCollectionRequest{ - CollectionID: collection, - ReplicaNumber: suite.replicaNumber[collection] + 1, - ResourceGroups: []string{"rg1", "rg2"}, - } - resp, err := server.LoadCollection(ctx, req) - suite.NoError(err) - suite.Equal(commonpb.ErrorCode_IllegalArgument, resp.ErrorCode) - } -} - func (suite *ServiceSuite) TestLoadPartition() { ctx := context.Background() server := suite.server