Skip to content

Commit

Permalink
fix indexnode ut
Browse files Browse the repository at this point in the history
Signed-off-by: Cai Zhang <[email protected]>
  • Loading branch information
xiaocai2333 committed Jan 8, 2025
1 parent 8e637ee commit 5cc499d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/indexnode/indexnode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ func (s *IndexNodeSuite) Test_CreateStatsTask() {
err = merr.Error(slotResp.GetStatus())
s.NoError(err)

s.Equal(int64(1), slotResp.GetTaskSlots())
s.Equal(int64(16), slotResp.GetTaskSlots())

status, err = s.in.DropJobsV2(ctx, &workerpb.DropJobsV2Request{
ClusterID: "cluster2",
Expand Down
4 changes: 4 additions & 0 deletions internal/indexnode/task_scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ func (t *fakeTask) Ctx() context.Context {
return t.ctx
}

func (t *fakeTask) GetSlot() int64 {
return 1
}

func (t *fakeTask) OnEnqueue(ctx context.Context) error {
_taskwg.Add(1)
t.state = fakeTaskEnqueued
Expand Down

0 comments on commit 5cc499d

Please sign in to comment.