From 9a0bbb60bc3eb68d045aae7535d34f4d02b959f1 Mon Sep 17 00:00:00 2001 From: machine424 Date: Fri, 11 Jul 2025 15:32:26 +0200 Subject: [PATCH] test(tsdb): disable TestDelayedCompaction/delayed_compaction_enabled on windows as flaky because of Time imprecision fixes https://github.com/prometheus/prometheus/issues/16450 Signed-off-by: machine424 --- tsdb/compact_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tsdb/compact_test.go b/tsdb/compact_test.go index 1ee08e3efb..330c187af6 100644 --- a/tsdb/compact_test.go +++ b/tsdb/compact_test.go @@ -1964,10 +1964,6 @@ func TestDelayedCompaction(t *testing.T) { for db.head.compactable() { time.Sleep(time.Millisecond) } - if runtime.GOOS == "windows" { - // TODO: enable on windows once ms resolution timers are better supported. - return - } duration := time.Since(start) require.Less(t, duration, delay) } @@ -1989,8 +1985,10 @@ func TestDelayedCompaction(t *testing.T) { } for _, c := range cases { - c := c t.Run(c.name, func(t *testing.T) { + if c.compactionDelay > 0 && runtime.GOOS == "windows" { + t.Skip("Time imprecision on windows makes the test flaky, see https://github.com/prometheus/prometheus/issues/16450") + } t.Parallel() var options *Options