Skip to content

Commit

Permalink
test/e2e: Add timestamp to e2e test log output
Browse files Browse the repository at this point in the history
Signed-off-by: Frederic Branczyk <[email protected]>
  • Loading branch information
brancz committed Mar 31, 2020
1 parent 3954d5f commit 6efa84f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/e2e/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6efa84f

Please sign in to comment.