Seen during #9088
time="2023-09-13T01:07:30Z" level=warning msg="Invalid SOURCE_DATE_EPOCH" error="invalid SOURCE_DATE_EPOCH value: invalid value: strconv.ParseInt: parsing \"foo\": invalid syntax"
epoch_test.go:110:
Error Trace: D:/a/containerd/containerd/src/github.com/containerd/containerd/pkg/epoch/epoch_test.go:110
Error: Should be true
Test: TestSourceDateEpoch/WithInvalidSourceDateEpoch
Messages: now: 2023-09-13 01:07:30.1079008 +0000 UTC, v: 2023-09-13 01:07:30.2645118 +0000 UTC
})
The failing line is
require.True(t, rightAfter(now, v), "now: %s, v: %s", now, v)
Maybe the timer resolution on Windows is a bit different from what we expect?
threshold := 10 * time.Millisecond
if runtime.GOOS == "windows" {
// Low timer resolution on Windows
threshold *= 10
}
return t2.After(t1) && t2.Before(t1.Add(threshold))