diff --git a/test/e2e/query_frontend_test.go b/test/e2e/query_frontend_test.go index 99ce9cd810c..01605c06ae8 100644 --- a/test/e2e/query_frontend_test.go +++ b/test/e2e/query_frontend_test.go @@ -26,7 +26,6 @@ import ( "github.com/prometheus/prometheus/model/timestamp" "github.com/prometheus/prometheus/prompb" - "github.com/thanos-io/thanos/pkg/block/metadata" "github.com/thanos-io/thanos/pkg/cacheutil" "github.com/thanos-io/thanos/pkg/promclient" @@ -44,7 +43,7 @@ func TestQueryFrontend(t *testing.T) { t.Cleanup(e2ethanos.CleanScenario(t, e)) now := time.Date(2023, time.December, 22, 12, 0, 0, 0, time.UTC) - tempfn := func () time.Time { return now } + tempfn := func() time.Time { return now } i := e2ethanos.NewReceiveBuilder(e, "ingestor-rw").WithIngestionEnabled().Init() testutil.Ok(t, e2e.StartAndWaitReady(i)) @@ -55,7 +54,7 @@ func TestQueryFrontend(t *testing.T) { tsMillis := timestamp.FromTime(now) var samplesrw []prompb.TimeSeries - + metric := []prompb.Label{ {Name: "__name__", Value: "up"}, {Name: "instance", Value: "localhost:9090"}, @@ -89,7 +88,7 @@ func TestQueryFrontend(t *testing.T) { t.Cleanup(cancel) testutil.Ok(t, RemoteWrite(ctx, samplesrw, i.Endpoint("remote-write"))) - + testutil.Ok(t, q.WaitSumMetricsWithOptions(e2emon.Equals(1), []string{"thanos_store_nodes_grpc_connections"}, e2emon.WaitMissingMetrics())) // Ensure we can get the result from Querier first so that it diff --git a/test/e2e/query_test.go b/test/e2e/query_test.go index 564a5944631..20fbbaa9a6d 100644 --- a/test/e2e/query_test.go +++ b/test/e2e/query_test.go @@ -1721,7 +1721,6 @@ func rangeQuery(t *testing.T, ctx context.Context, addr string, q func() string, return retExplanation } - func RemoteWrite(ctx context.Context, timeseries []prompb.TimeSeries, addr string) error { // Create write request data, err := proto.Marshal(&prompb.WriteRequest{Timeseries: timeseries}) @@ -1746,7 +1745,7 @@ func RemoteWrite(ctx context.Context, timeseries []prompb.TimeSeries, addr strin return err } defer runutil.ExhaustCloseWithErrCapture(&err, res.Body, "%s: close body", req.URL.String()) - + if res.StatusCode/100 != 2 { return errors.Errorf("request failed with code %s", res.Status) }