Skip to content

Commit

Permalink
fix build error of ngt stateful test
Browse files Browse the repository at this point in the history
Signed-off-by: hlts2 <[email protected]>
  • Loading branch information
hlts2 committed Jul 11, 2023
1 parent b1a6435 commit f029ca3
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions pkg/agent/core/ngt/service/ngt_stateful_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,10 @@ var (
RunFunc: func(
systemUnderTest commands.SystemUnderTest,
) commands.Result {
ngt := systemUnderTest.(*ngtSystem).ngt
ngtSys := systemUnderTest.(*ngtSystem)
ngt := ngtSys.ngt

res, err := ngt.Search([]float32{0.1, 0.1, 0.1}, 3, 0.1, -1.0)
res, err := ngt.Search(ngtSys.ctx, []float32{0.1, 0.1, 0.1}, 3, 0.1, -1.0)
return &resultContainer{
err: err,
results: res,
Expand Down Expand Up @@ -583,9 +584,10 @@ var (
RunFunc: func(
systemUnderTest commands.SystemUnderTest,
) commands.Result {
ngt := systemUnderTest.(*ngtSystem).ngt
ngtSys := systemUnderTest.(*ngtSystem)
ngt := ngtSys.ngt

_, res, err := ngt.SearchByID(idA, 3, 0.1, -1.0)
_, res, err := ngt.SearchByID(ngtSys.ctx, idA, 3, 0.1, -1.0)
return &resultContainer{
err: err,
results: res,
Expand Down Expand Up @@ -662,9 +664,10 @@ var (
RunFunc: func(
systemUnderTest commands.SystemUnderTest,
) commands.Result {
ngt := systemUnderTest.(*ngtSystem).ngt
ngtSys := systemUnderTest.(*ngtSystem)
ngt := ngtSys.ngt

_, res, err := ngt.SearchByID(idB, 3, 0.1, -1.0)
_, res, err := ngt.SearchByID(ngtSys.ctx, idB, 3, 0.1, -1.0)
return &resultContainer{
err: err,
results: res,
Expand Down Expand Up @@ -741,9 +744,10 @@ var (
RunFunc: func(
systemUnderTest commands.SystemUnderTest,
) commands.Result {
ngt := systemUnderTest.(*ngtSystem).ngt
ngtSys := systemUnderTest.(*ngtSystem)
ngt := ngtSys.ngt

_, res, err := ngt.SearchByID(idC, 3, 0.1, -1.0)
_, res, err := ngt.SearchByID(ngtSys.ctx, idC, 3, 0.1, -1.0)
return &resultContainer{
err: err,
results: res,
Expand Down

0 comments on commit f029ca3

Please sign in to comment.