Change time comparison to non-strict to better handle low precision clocks. #1

Merged
merged 1 commit into from May 31, 2017

Conversation

Projects
None yet
2 participants
Contributor

wupeka commented May 30, 2017

No description provided.

Looks good, but please add a test (and ensure that it fails without the new code), thanks.

LGTM, thanks.

@rogpeppe rogpeppe merged commit 0163107 into go-retry:v1 May 31, 2017

@axw axw referenced this pull request in juju/juju Jun 1, 2017

Merged

dependencies.tsv: update gopkg.in/retry.v1 #7429

jujubot added a commit to juju/juju that referenced this pull request Jun 1, 2017

Merge pull request #7429 from axw/bump-retry-dependency
dependencies.tsv: update gopkg.in/retry.v1

## Description of change

This brings in the fix in go-retry/retry#1. This should address http://qa.jujucharms.com/releases/5319/job/run-unit-tests-win2012-amd64/attempt/3809.

## QA steps

I temporarily changed TestDialAPIMultipleError to pass in a `fakeClock`, which will advance the time exactly the amount requested. Since the sleep amount is 0, the time will not advance, and so the retry would previously loop forever. With the updated dependency, it works as expected.

The test would previously fail with the system clock because if the time doesn't advance at all (which is more likely with a low resolution system clock), an additional dial attempt would be made.

## Documentation changes

None.

## Bug reference

None.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment