Closed GoogleCodeExporter closed 9 years ago
This is very strange. I'm not sure how this could be happening. Any additional
info you could provide would be great.
Original comment by a...@golang.org
on 31 Oct 2013 at 11:44
I'm thoroughly stumped as well. The most promising lead I have is that it only
reproduces (so far) on OpenShift. That's all I know at the moment. I'll dig
into it more, though...
Original comment by joshar...@gmail.com
on 1 Nov 2013 at 12:49
Ok, I finally understand what is happening. It looks like there's a bit of
clock jitter in this environment.
Twice during TestOAuth, transport.Expiry is set to time.Now() to trigger a
token refresh. Due to clock jitter, however, sometimes the token is *not*
detected as expired, and the expected refresh call never gets made. (Cf.
Expiry=-158.99us in the last line of the test output above.)
I'll see about resolving the clock jitter, but I'm not optimistic.
Independently, changing:
https://code.google.com/p/goauth2/source/browse/oauth/oauth_test.go#118
https://code.google.com/p/goauth2/source/browse/oauth/oauth_test.go#127
to use (say) time.Now.Add(-time.Hour) instead of time.Now() fixes the problem.
Are you open to that?
Original comment by joshar...@gmail.com
on 1 Nov 2013 at 10:09
Sure, I'd accept that fix. Seems fine.
Original comment by a...@golang.org
on 4 Nov 2013 at 2:25
Original comment by a...@golang.org
on 4 Nov 2013 at 2:25
This issue was closed by revision 8eeae4635bf6.
Original comment by a...@golang.org
on 5 Nov 2013 at 2:04
Original issue reported on code.google.com by
joshar...@gmail.com
on 31 Oct 2013 at 6:09