From 0daee253c57d2c2a618c3176f0efe265fdb9efab Mon Sep 17 00:00:00 2001 From: bigsheeper Date: Tue, 17 Dec 2024 18:04:41 +0800 Subject: [PATCH] fix ut Signed-off-by: bigsheeper --- internal/rootcoord/constrant_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/rootcoord/constrant_test.go b/internal/rootcoord/constrant_test.go index ed68877551dba..6e8bb9e734ce0 100644 --- a/internal/rootcoord/constrant_test.go +++ b/internal/rootcoord/constrant_test.go @@ -59,7 +59,7 @@ func TestCheckGeneralCapacity(t *testing.T) { catalog.EXPECT().CreateCollection(mock.Anything, mock.Anything, mock.Anything).Return(nil) err = meta.CreateDatabase(ctx, &model.Database{}, typeutil.MaxTimestamp) - assert.Error(t, err) + assert.NoError(t, err) err = meta.AddCollection(ctx, &model.Collection{ CollectionID: 1, State: pb.CollectionState_CollectionCreating, @@ -83,7 +83,7 @@ func TestCheckGeneralCapacity(t *testing.T) { err = checkGeneralCapacity(ctx, 1, 1, 1, core) assert.Error(t, err) - err = meta.ChangeCollectionState(ctx, 1, pb.CollectionState_CollectionDropped, typeutil.MaxTimestamp) + err = meta.ChangeCollectionState(ctx, 1, pb.CollectionState_CollectionDropping, typeutil.MaxTimestamp) assert.NoError(t, err) assert.Equal(t, 0, meta.GetGeneralCount(ctx))