-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Quiet prometheus end to end tests #4205
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jaydoane
force-pushed
the
quiet-prometheus-e2e-tests
branch
2 times, most recently
from
October 13, 2022 21:19
536bb9d
to
d21bac8
Compare
Currently, applications are restarted during individual tests, resulting in noisy output: module 'couch_prometheus_e2e_tests' Prometheus E2E Tests couch_prometheus_e2e_tests:66: node_call_chttpd...ok Application config was left running! Application asn1 was left running! Application b64url was left running! Application public_key was left running! Application ssl was left running! Application couch_dist was left running! Application couch_epi was left running! Application khash was left running! Application couch_event was left running! Application folsom was left running! Application couch_stats was left running! Application hyper was left running! Application ibrowse was left running! Application inets was left running! Application hqueue was left running! Application compiler was left running! Application syntax_tools was left running! Application xmerl was left running! Application mochiweb was left running! Application sasl was left running! Application ets_lru was left running! Application rexi was left running! Application fabric was left running! couch_prometheus_e2e_tests:98: node_call_prometheus_http...ok Application config was left running! Application asn1 was left running! Application b64url was left running! Application public_key was left running! Application ssl was left running! Application couch_dist was left running! Application couch_epi was left running! Application khash was left running! Application couch_event was left running! Application folsom was left running! Application couch_stats was left running! Application hyper was left running! Application ibrowse was left running! Application inets was left running! Application hqueue was left running! Application compiler was left running! Application syntax_tools was left running! Application xmerl was left running! Application mochiweb was left running! Application sasl was left running! Application ets_lru was left running! Application rexi was left running! Application fabric was left running! couch_prometheus_e2e_tests:109: deny_prometheus_http...ok couch_prometheus_e2e_tests:82: node_see_updated_metrics...ok [done in 6.595 s] [done in 8.739 s] To reduce the noise, this factors the current test generator into two: one where a separate prometheus HTTP server is started on a dedicated port, and one where it is not. Additionally, tests have been changed to use the TDEF_FE macro, cleaned up, and renamed to make them easier to understand. Finally, this simplifies the test for observing metric updates by picking a metric that increments automatically with the passage of time.
jaydoane
force-pushed
the
quiet-prometheus-e2e-tests
branch
from
October 14, 2022 00:57
f3f6390
to
e68363e
Compare
nickva
approved these changes
Oct 14, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
It looks much better. Well done!
======================== EUnit ========================
module 'couch_prometheus_util'
module 'couch_prometheus_util_tests'
couch_prometheus_util_tests:19: couch_prometheus_util_test_...[0.009 s] ok
couch_prometheus_util_tests:23: couch_prometheus_util_test_...ok
couch_prometheus_util_tests:27: couch_prometheus_util_test_...ok
couch_prometheus_util_tests:31: couch_prometheus_util_test_...ok
[done in 0.021 s]
[done in 0.021 s]
module 'couch_prometheus_sup'
module 'couch_prometheus_app'
module 'couch_prometheus_server'
module 'couch_prometheus_http'
module 'couch_prometheus_e2e_tests'
With dedicated port
couch_prometheus_e2e_tests:40: e2e_test_ (t_chttpd_port)...[0.107 s] ok
couch_prometheus_e2e_tests:41: e2e_test_ (t_prometheus_port)...[0.003 s] ok
couch_prometheus_e2e_tests:42: e2e_test_ (t_metric_updated)...[4.894 s] ok [done in 5.014 s]
Without dedicated port
couch_prometheus_e2e_tests:65: reject_test_ (t_reject_prometheus_port)...[0.001 s] ok
[done in 0.004 s]
[done in 6.427 s]
=======================================================
All 8 tests passed.
Cover analysis: /Users/nvatama/asf-1/src/couch_prometheus/.eunit/index.html
Code Coverage:
couch_prometheus_app : 100%
couch_prometheus_e2e_tests : 96%
couch_prometheus_http : 56%
couch_prometheus_server : 77%
couch_prometheus_sup : 83%
couch_prometheus_util : 47%
Total : 68%
==> rel (eunit)
==> asf-1 (eunit)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Currently, applications are restarted during individual tests, resulting in noisy output:
To reduce the noise, this factors the current test generator into two:
one where a separate prometheus HTTP server is started on a dedicated
port, and one where it is not.
Additionally, tests have been changed to use the TDEF_FE macro,
cleaned up, and renamed to make them easier to understand.
Finally, this simplifies the test for observing metric updates by
picking a metric that increments automatically with the passage of
time.
Testing recommendations
Should have a lot less log spam now.
Related Issues or Pull Requests
Checklist
rel/overlay/etc/default.ini
src/docs
folder