Skip to content

Commit

Permalink
Fix coverage CI error (#2150)
Browse files Browse the repository at this point in the history
* Skip performance test on -short

* remove deepsource coverage because we're not using it right now

* Revert "remove deepsource coverage because we're not using it right now"

This reverts commit a8fee24.

* refactor skip

* skip at TestMain

* parse flag before calling testing.Short

* [REVERTTHIS] add change to kick coverage ci

* Revert "[REVERTTHIS] add change to kick coverage ci"

This reverts commit 39ec638.
  • Loading branch information
ykadowak authored Aug 7, 2023
1 parent 760d586 commit 734cd4f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/performance/max_vector_dim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package performance
import (
"bufio"
"context"
"flag"
"os"
"strconv"
"sync"
Expand All @@ -28,6 +29,7 @@ import (
"github.com/vdaas/vald/internal/core/algorithm/ngt"
"github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/strings"
"github.com/vdaas/vald/internal/test/data/vector"
Expand Down Expand Up @@ -79,6 +81,15 @@ func parse(raw string) (key string, value int) {
return keyValue[0], val
}

func TestMain(m *testing.M) {
flag.Parse()
if testing.Short() {
log.Info("skipping this pkg test when -short because it takes a long time")
os.Exit(0)
}
os.Exit(m.Run())
}

// Test for investigation of max dimension size for agent handler
func TestMaxDimInsert(t *testing.T) {
t.Helper()
Expand Down

0 comments on commit 734cd4f

Please sign in to comment.