Skip to content

Commit

Permalink
kgo tests: add timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
twmb committed Oct 21, 2023
1 parent d520096 commit 5cfb6a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/kgo/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func testLogger() Logger {
num := loggerNum.Add(1)
pfx := strconv.Itoa(int(num))
return BasicLogger(os.Stderr, testLogLevel, func() string {
return time.Now().Format("[15:04:05 ") + pfx + "]"
return time.Now().UTC().Format("[15:04:05.999 ") + pfx + "]"
})
}

Expand Down
4 changes: 3 additions & 1 deletion pkg/kgo/txn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ func TestTxnEtl(t *testing.T) {
go func() {
cl, err := NewClient(
getSeedBrokers(),
WithLogger(BasicLogger(os.Stderr, testLogLevel, nil)),
WithLogger(BasicLogger(os.Stderr, testLogLevel, func() string {
return time.Now().UTC().Format("15:04:05.999") + " "
})),
TransactionalID("p"+randsha()),
TransactionTimeout(2*time.Minute),
MaxBufferedRecords(10000),
Expand Down

0 comments on commit 5cfb6a5

Please sign in to comment.