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

orchestrator: Make global tests more robust; use generic Expect function #1676

Merged
merged 1 commit into from
Oct 24, 2016

Conversation

aaronlehmann
Copy link
Collaborator

@aaronlehmann aaronlehmann commented Oct 21, 2016

The global orchestrator tests were pausing 200 ms to wait for some events to pass. It's more reliable to just consume these specific events. This changes them to do that, and also replace testutils.Expect* with a single Expect function. This is nicer than having a separate function for every event type. The Checks in the event structure can be used to match specific event properties.

In the future, I may also convert testutils.Watch* to a similar Watch function.

cc @dongluochen

@aaronlehmann
Copy link
Collaborator Author

Rebased. This is ready now.

@dongluochen
Copy link
Contributor

Test fails.

--- FAIL: TestDemoteToSingleManager (1.64s)
    Error Trace:    integration_test.go:286
    Error:      Received unexpected error "rpc error: code = 13 desc = transport is closing"

@aaronlehmann
Copy link
Collaborator Author

Unrelated and tracked here: #1680.

@dongluochen
Copy link
Contributor

LGTM

The global orchestrator tests were pausing 200 ms to wait for some
events to pass. It's more reliable to just consume these specific
events. This changes them to do that, and also replaces
testutils.Expect* with a single Expect function. This is nicer than
having a separate function for every event type. The Checks in the event
structure can be used to match specific event properties.

In the future, I may also convert testutils.Watch* to a similar Watch
function.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
@aaronlehmann aaronlehmann merged commit b992fa9 into moby:master Oct 24, 2016
@aaronlehmann aaronlehmann deleted the remove-skipevents branch October 24, 2016 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants