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

Tolerate multiple hooks' initialisations #6

Merged
merged 2 commits into from
Oct 10, 2017

Conversation

marccarre
Copy link
Contributor

Changelog:

  • systematically unregister counter vector, which does not throw any error, before registering it,
  • add tests to ensure the above works as expected,
  • teardown HTTP server started by each test.

Fixes #5.

This is to support multiple (typically accidental) initialisations.
This avoids runtime errors like:
```
panic: http: multiple registrations for /metrics
```
@coveralls
Copy link

coveralls commented Oct 9, 2017

Coverage Status

Coverage increased (+0.7%) to 90.0% when pulling 3cf5f3c on issues/5-multiple-inits into 0b17fa8 on master.

@marccarre marccarre merged commit 0a7b17f into master Oct 10, 2017
@marccarre marccarre deleted the issues/5-multiple-inits branch October 10, 2017 09: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.

None yet

3 participants