From 6efa84f93a838a6f2aeaa9e978fe796a36c7b553 Mon Sep 17 00:00:00 2001 From: Frederic Branczyk Date: Tue, 31 Mar 2020 17:37:57 +0200 Subject: [PATCH] test/e2e: Add timestamp to e2e test log output Signed-off-by: Frederic Branczyk --- test/e2e/query_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/e2e/query_test.go b/test/e2e/query_test.go index 5090d3f8b1a..b61228e0c95 100644 --- a/test/e2e/query_test.go +++ b/test/e2e/query_test.go @@ -168,7 +168,9 @@ func instantQuery(t *testing.T, ctx context.Context, addr string, q string, opts fmt.Println("queryAndAssert: Waiting for", expectedSeriesLen, "results for query", q) var result model.Vector - testutil.Ok(t, runutil.RetryWithLog(log.NewLogfmtLogger(os.Stdout), time.Second, ctx.Done(), func() error { + logger := log.NewLogfmtLogger(os.Stdout) + logger = log.With(logger, "ts", log.DefaultTimestampUTC) + testutil.Ok(t, runutil.RetryWithLog(logger, time.Second, ctx.Done(), func() error { res, warnings, err := promclient.QueryInstant(ctx, nil, urlParse(t, "http://"+addr), q, time.Now(), opts) if err != nil { return err