Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
Signed-off-by: bigsheeper <[email protected]>
  • Loading branch information
bigsheeper committed Dec 17, 2024
1 parent 317e3e8 commit 0daee25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/rootcoord/constrant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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))
Expand Down

0 comments on commit 0daee25

Please sign in to comment.