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

Try to fix flakey integration tests, also update the definition of notary server health #952

Merged

Conversation

cyli
Copy link
Contributor

@cyli cyli commented Sep 13, 2016

Integration tests have been failing lately - it seems it's because the server comes up before the signer, and the integration tests start before the server manages to connect to the signer.

This fix should hopefully cause the tests to wait until the server is healthy for sure, so they might take longer to start.

This also changes the definition of notary server health - previously it was healthy but degraded if the signer is down - not it's just unhealthy, because we cannot do any writes.

An alternate approach is to just have a separate endpoint to see whether it runs in degraded mode, or use a different health package that supports "warning" or degraded mode without necessarily failing the health check entirely.

… decrease the

amount of time between health polls for the server, and ensure that the integration
tests wait until the server is healthy before proceeding.  We have to wait for it
to succeed twice, because when the server first starts up it is healthy until
the first health function returns.  Ideally, the server would start unhealthy, but
the distribution health package is healthy until not.

Signed-off-by: Ying Li <ying.li@docker.com>
@cyli cyli changed the title WIP: try to fix flakey integration tests, also update the definition of notary server health Try to fix flakey integration tests, also update the definition of notary server health Sep 13, 2016
@riyazdf
Copy link
Contributor

riyazdf commented Sep 13, 2016

I'm good with this new "healthy" definition, thanks for updating this :)

LGTM

@endophage
Copy link
Contributor

This all LGTM!

@endophage endophage merged commit afd5a55 into notaryproject:master Sep 13, 2016
@cyli cyli deleted the integration-test-wait-for-server-health branch September 13, 2016 23:26
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.

4 participants