Skip to content

Commit

Permalink
enhance: TestDeleteComplexExpr may failure because of timeout
Browse files Browse the repository at this point in the history
Signed-off-by: chyezh <[email protected]>
  • Loading branch information
chyezh committed Jan 2, 2025
1 parent aa0a87e commit c02f243
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/go_client/testcases/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"
"time"

"github.com/remeh/sizedwaitgroup"
"github.com/stretchr/testify/require"
"go.uber.org/zap"

Expand Down Expand Up @@ -476,7 +477,9 @@ func TestDeleteComplexExpr(t *testing.T) {
{expr: fmt.Sprintf("%s == [0, 1]", common.DefaultDoubleArrayField), count: 0}, // array ==
{expr: fmt.Sprintf("array_length(%s) == %d", common.DefaultDoubleArrayField, capacity), count: common.DefaultNb}, // array_length
}
for _, exprLimit := range exprLimits {
sizedwaitgroup := sizedwaitgroup.New(5)
testFunc := func(exprLimit exprCount) {
defer sizedwaitgroup.Done()
ctx := hp.CreateContext(t, time.Second*common.DefaultTimeout*2)
mc := createDefaultMilvusClient(ctx, t)

Expand All @@ -503,6 +506,13 @@ func TestDeleteComplexExpr(t *testing.T) {
common.CheckErr(t, err, true)
require.Zero(t, resQuery.ResultCount)
}

for _, exprLimit := range exprLimits {
exprLimit := exprLimit
sizedwaitgroup.Add()
go testFunc(exprLimit)
}
sizedwaitgroup.Wait()
}

func TestDeleteInvalidExpr(t *testing.T) {
Expand Down

0 comments on commit c02f243

Please sign in to comment.