Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integ-cli: Fix clock skew against remote test daemon #11330

Merged
merged 1 commit into from Mar 11, 2015
Merged

integ-cli: Fix clock skew against remote test daemon #11330

merged 1 commit into from Mar 11, 2015

Conversation

@ahmetb
Copy link
Contributor

@ahmetb ahmetb commented Mar 11, 2015

This fixes the docker events-related tests as they have been
failing due to clock skew between CI machine and test daemon on
some other machine (even 1-2 seconds of diff causes races as
we use local machine time in --since/--until args).

If we're running in same host, we keep using time.Now(), otherwise
we read the system time of the daemon from /info endpoint, which
is recently added there.

Fixes pretty much all events-related tests on windows CI.

Signed-off-by: Ahmet Alp Balkan ahmetalpbalkan@gmail.com
cc: @jfrazelle @duglin @LK4D4 @icecrime

This fixes the `docker events`-related tests as they have been
failing due to clock skew between CI machine and test daemon on
some other machine (even 1-2 seconds of diff causes races as
we pass local time to --since/--until).

If we're running in same host, we keep using time.Now(), otherwise
we read the system time of the daemon from `/info` endpoint.

Fixes pretty much all events-related tests on windows CI.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
@tiborvass
Copy link
Collaborator

@tiborvass tiborvass commented Mar 11, 2015

OMG Thanks @ahmetalpbalkan and @jfrazelle !

LGTM

@icecrime
Copy link
Contributor

@icecrime icecrime commented Mar 11, 2015

That's a lot of additional API calls, but I don't see a better alternative.

@tiborvass
Copy link
Collaborator

@tiborvass tiborvass commented Mar 11, 2015

@icecrime only for remote daemons

@icecrime
Copy link
Contributor

@icecrime icecrime commented Mar 11, 2015

Mmm yes indeed! LGTM.

@jessfraz
Copy link
Contributor

@jessfraz jessfraz commented Mar 11, 2015

LGTM

jessfraz pushed a commit that referenced this issue Mar 11, 2015
integ-cli: Fix clock skew against remote test daemon
@jessfraz jessfraz merged commit bf35122 into moby:master Mar 11, 2015
1 of 2 checks passed
@ahmetb
Copy link
Contributor Author

@ahmetb ahmetb commented Mar 11, 2015

💖

@ahmetb ahmetb deleted the win-cli/events-daemon-time branch Mar 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants