From 5670230edc59b1d6eb082844e78e85111adf9bda Mon Sep 17 00:00:00 2001 From: Alexandr Burdiyan Date: Tue, 27 Feb 2024 17:49:51 +0100 Subject: [PATCH] test(backend): fix broken hlc test --- backend/hlc/hlc_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/hlc/hlc_test.go b/backend/hlc/hlc_test.go index 05d370220..bc7cbba17 100644 --- a/backend/hlc/hlc_test.go +++ b/backend/hlc/hlc_test.go @@ -79,9 +79,10 @@ func TestCoverage(t *testing.T) { c.nowFunc = time.Now { - now := time.Now() - ts := FromTime(now) - require.True(t, now.Equal(ts.Time()), "timestamp must be convertible to time") + want := time.Now() + ts := FromTime(want) + got := ts.Time() + require.True(t, want.Equal(got), "timestamp must be convertible to time want=%d got=%d", want.UnixMicro(), got.UnixMicro()) } {