Skip to content

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

Merged
jessfraz merged 1 commit intomoby:masterfrom
ahmetb:win-cli/events-daemon-time
Mar 11, 2015
Merged

integ-cli: Fix clock skew against remote test daemon#11330
jessfraz merged 1 commit intomoby:masterfrom
ahmetb:win-cli/events-daemon-time

Conversation

@ahmetb
Copy link
Copy Markdown
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
Copy Markdown
Contributor

OMG Thanks @ahmetalpbalkan and @jfrazelle !

LGTM

@icecrime
Copy link
Copy Markdown
Contributor

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

@tiborvass
Copy link
Copy Markdown
Contributor

@icecrime only for remote daemons

@icecrime
Copy link
Copy Markdown
Contributor

Mmm yes indeed! LGTM.

@jessfraz
Copy link
Copy Markdown
Contributor

LGTM

jessfraz pushed a commit that referenced this pull request Mar 11, 2015
integ-cli: Fix clock skew against remote test daemon
@jessfraz jessfraz merged commit bf35122 into moby:master Mar 11, 2015
@ahmetb
Copy link
Copy Markdown
Contributor Author

ahmetb commented Mar 11, 2015

💖

@ahmetb ahmetb deleted the win-cli/events-daemon-time branch March 11, 2015 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants