Gopher Robot submitted the change![Open in Gerrit]()
Change information
Commit message:
internal/modindex: fix clock race causing test flakes
time.Now uses a high-res VDSO timer, but on Linux the clock used to
set file mtimes is lower res and may lag. This leads to a
race that causes TestIncremental{,Nope} to flake.
This CL subtracts 1s from the high-res time so that it is not
behind the file mtime.
Fixes golang/go#74658
Change-Id: I7e2cca4adbd66c918325ea88d7d9cb3494456441
Files:
- M internal/modindex/dir_test.go
- M internal/modindex/modindex.go
Change size: XS
Delta: 2 files changed, 5 insertions(+), 3 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +2 by Peter Weinberger
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Gerrit-MessageType: merged
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: I7e2cca4adbd66c918325ea88d7d9cb3494456441
Gerrit-Change-Number: 765120
Gerrit-PatchSet: 2