From 9be1b8fee777fb94d11859a59258f16d0ea6f7c3 Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Wed, 20 Nov 2024 10:02:50 +0100 Subject: [PATCH] fix: add very small delay between observations to make test more realistic (and faster) Signed-off-by: Ivan Goncharov --- prometheus/histogram_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/prometheus/histogram_test.go b/prometheus/histogram_test.go index f3ee917ea..1a19df2e2 100644 --- a/prometheus/histogram_test.go +++ b/prometheus/histogram_test.go @@ -382,6 +382,7 @@ func TestHistogramAtomicObserve(t *testing.T) { return default: his.Observe(1) + time.Sleep(time.Nanosecond) } } }