Skip to content

Commit

Permalink
Bug fix using undefined a variable at maxDimensionTest (#1856)
Browse files Browse the repository at this point in the history
Signed-off-by: vankichi <[email protected]>

Signed-off-by: vankichi <[email protected]>
  • Loading branch information
vankichi authored Nov 22, 2022
1 parent e8aff80 commit fbeb0e3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/performance/max_vector_dim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (

"github.com/vdaas/vald/apis/grpc/v1/payload"
"github.com/vdaas/vald/internal/config"
"github.com/vdaas/vald/internal/core/algorithm"
"github.com/vdaas/vald/internal/core/algorithm/ngt"
"github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
Expand Down Expand Up @@ -130,8 +131,8 @@ func TestMaxDimInsert(t *testing.T) {
if bit == maxBit {
dim--
}
if dim > ngt.VectorDimensionSizeLimit {
t.Fatal(errors.ErrInvalidDimensionSize(dim, ngt.VectorDimensionSizeLimit))
if dim > algorithm.MaximumVectorDimensionSize {
t.Fatal(errors.ErrInvalidDimensionSize(dim, algorithm.MaximumVectorDimensionSize))
}
t.Logf("Start test: dimension = %d (bit = %d)", dim, bit)
ngt, err := init_ngt_service(dim)
Expand Down Expand Up @@ -233,8 +234,8 @@ func TestMaxDimInsertGRPC(t *testing.T) {
if bit == maxBit {
dim--
}
if dim > ngt.VectorDimensionSizeLimit {
t.Fatal(errors.ErrInvalidDimensionSize(dim, ngt.VectorDimensionSizeLimit))
if dim > algorithm.MaximumVectorDimensionSize {
t.Fatal(errors.ErrInvalidDimensionSize(dim, algorithm.MaximumVectorDimensionSize))
}
t.Logf("Start test: dimension = %d (bit = %d)", dim, bit)
ngt, err := init_ngt_service(dim)
Expand Down

0 comments on commit fbeb0e3

Please sign in to comment.