The timeNow package variable doesn't work well here: since the renewal functionality spawns goroutines that invoke timeNow, once a test has caused such goroutines to exist, another test can't fiddle with it without the race detector triggering. Instead, have a private member of Manager that the tests can set if they need. Change-Id: Iaf1a68d8efb84c9c5e2804aeb9cc6b2d3f3fef43 Reviewed-on: https://go-review.googlesource.com/128655 Run-TryBot: Adam Langley <agl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>