Skip to content

Commit

Permalink
remove temp dev test
Browse files Browse the repository at this point in the history
Signed-off-by: Thibault Mange <22740367+thibaultmg@users.noreply.github.com>
  • Loading branch information
thibaultmg committed Apr 2, 2024
1 parent 99213a3 commit 56902d0
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions pkg/store/storepb/inprocess_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ import (
"context"
"fmt"
"io"
"runtime"
"testing"
"time"

"github.com/efficientgo/core/testutil"
"github.com/pkg/errors"
Expand Down Expand Up @@ -189,41 +187,6 @@ func TestServerAsClient(t *testing.T) {
s.seriesLastReq = nil
}
})
t.Run("context cancel", func(t *testing.T) {
for i := 0; i < 20; i++ {
r := &SeriesRequest{
MinTime: -214,
MaxTime: 213,
Matchers: []LabelMatcher{{Value: "wfsdfs", Name: "__name__", Type: LabelMatcher_EQ}},
PartialResponseStrategy: PartialResponseStrategy_ABORT,
}
before := runtime.NumGoroutine()
ctx, cancel := context.WithCancel(context.Background())
client, err := ServerAsClient(s, 0).Series(ctx, r)
cancel()
testutil.Ok(t, err)
// var resps []*SeriesResponse
for {
_, err := client.Recv()
if err == io.EOF {
break
}
if err != nil {
break
}
// testutil.Ok(t, err)
// resps = append(resps, resp)
}
time.Sleep(10 * time.Millisecond)
after := runtime.NumGoroutine()
if after > before {
t.Errorf("Possible goroutine leak detected. Before: %d, After: %d", before, after)
}
// testutil.Equals(t, s.series[:len(s.series)/2], resps)
// testutil.Equals(t, r, s.seriesLastReq)
s.seriesLastReq = nil
}
})
})
t.Run("LabelNames", func(t *testing.T) {
s := &testStoreServer{
Expand Down

0 comments on commit 56902d0

Please sign in to comment.