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 <ayoubmrini424@gmail.com>
This commit is contained in:
machine424 2025-07-11 15:32:26 +02:00 committed by Ayoub Mrini
parent da9b8b2f8d
commit 9a0bbb60bc

View File

@ -1964,10 +1964,6 @@ func TestDelayedCompaction(t *testing.T) {
for db.head.compactable() { for db.head.compactable() {
time.Sleep(time.Millisecond) time.Sleep(time.Millisecond)
} }
if runtime.GOOS == "windows" {
// TODO: enable on windows once ms resolution timers are better supported.
return
}
duration := time.Since(start) duration := time.Since(start)
require.Less(t, duration, delay) require.Less(t, duration, delay)
} }
@ -1989,8 +1985,10 @@ func TestDelayedCompaction(t *testing.T) {
} }
for _, c := range cases { for _, c := range cases {
c := c
t.Run(c.name, func(t *testing.T) { 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() t.Parallel()
var options *Options var options *Options