Fix tests if filesystem stores less precise times
Not all filesystems store modification times with millisecond precision.
This commit is contained in:
parent
2c49804bd0
commit
e016300aab
|
@ -264,7 +264,7 @@ func setupSourceTest(t *testing.T) (func(), *SourceTestData) {
|
||||||
"no-urls": {},
|
"no-urls": {},
|
||||||
}
|
}
|
||||||
d.xTransport.rebuildTransport()
|
d.xTransport.rebuildTransport()
|
||||||
d.timeNow = time.Now().AddDate(0, 0, 0)
|
d.timeNow = time.Now().AddDate(0, 0, 0).Truncate(time.Second)
|
||||||
d.timeOld = d.timeNow.Add(DefaultPrefetchDelay * -4)
|
d.timeOld = d.timeNow.Add(DefaultPrefetchDelay * -4)
|
||||||
d.timeUpd = d.timeNow.Add(DefaultPrefetchDelay)
|
d.timeUpd = d.timeNow.Add(DefaultPrefetchDelay)
|
||||||
timeNow = func() time.Time { return d.timeNow } // originally defined in sources.go, replaced during testing to ensure consistent results
|
timeNow = func() time.Time { return d.timeNow } // originally defined in sources.go, replaced during testing to ensure consistent results
|
||||||
|
|
Loading…
Reference in New Issue