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

Conversation

Projects
None yet
6 participants
@ahmetb
Contributor

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

integ-cli: fix clock skew against remote test daemon
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

This comment has been minimized.

Collaborator

tiborvass commented Mar 11, 2015

OMG Thanks @ahmetalpbalkan and @jfrazelle !

LGTM

@icecrime

This comment has been minimized.

Contributor

icecrime commented Mar 11, 2015

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

@tiborvass

This comment has been minimized.

Collaborator

tiborvass commented Mar 11, 2015

@icecrime only for remote daemons

@icecrime

This comment has been minimized.

Contributor

icecrime commented Mar 11, 2015

Mmm yes indeed! LGTM.

@jessfraz

This comment has been minimized.

Contributor

jessfraz commented Mar 11, 2015

LGTM

jessfraz pushed a commit that referenced this pull request Mar 11, 2015

Jessie Frazelle
Merge pull request #11330 from ahmetalpbalkan/win-cli/events-daemon-time
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

windows Jenkins build is being scheduled
Details
janky Jenkins build Docker-PRs 3124 has succeeded
Details
@ahmetb

This comment has been minimized.

Contributor

ahmetb commented Mar 11, 2015

💖

@ahmetb ahmetb deleted the ahmetb: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