From 56902d0bcb82d6fbb8fd6247f1231f02a259436c Mon Sep 17 00:00:00 2001 From: Thibault Mange <22740367+thibaultmg@users.noreply.github.com> Date: Fri, 1 Dec 2023 16:28:40 +0100 Subject: [PATCH] remove temp dev test Signed-off-by: Thibault Mange <22740367+thibaultmg@users.noreply.github.com> --- pkg/store/storepb/inprocess_test.go | 37 ----------------------------- 1 file changed, 37 deletions(-) diff --git a/pkg/store/storepb/inprocess_test.go b/pkg/store/storepb/inprocess_test.go index 27e5a5dc090..b046ccc4c00 100644 --- a/pkg/store/storepb/inprocess_test.go +++ b/pkg/store/storepb/inprocess_test.go @@ -7,9 +7,7 @@ import ( "context" "fmt" "io" - "runtime" "testing" - "time" "github.com/efficientgo/core/testutil" "github.com/pkg/errors" @@ -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{