-
Notifications
You must be signed in to change notification settings - Fork 26
Add MicroMeter Prometheus tests #345
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
base: master
Are you sure you want to change the base?
Add MicroMeter Prometheus tests #345
Conversation
bdd6fdb
to
be6d9eb
Compare
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.
Thanks @marekkopecky - the changes mostly LGTM, but I dropped some minor comments for your evaluation.
BTW - the PR is still a draft. Do you plan to push more changes?
micrometer/src/test/java/org/jboss/eap/qe/micrometer/prometheus/MgmtUsersSetup.java
Outdated
Show resolved
Hide resolved
micrometer/src/test/java/org/jboss/eap/qe/micrometer/prometheus/MicrometerPrometheusSetup.java
Outdated
Show resolved
Hide resolved
...meter/src/test/java/org/jboss/eap/qe/micrometer/prometheus/MicrometerPrometheusTestCase.java
Show resolved
Hide resolved
...meter/src/test/java/org/jboss/eap/qe/micrometer/prometheus/MicrometerPrometheusTestCase.java
Outdated
Show resolved
Hide resolved
public void securityTest() throws Exception { | ||
try { | ||
// use authnetication, although prometheus is not secured yet | ||
MgmtUsersSetup.setup(); |
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.
IIUC, logically the above statement should be outside the try
block, since you're reverting it in the finally
block, correct?
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.
securityTest test method updated
...meter/src/test/java/org/jboss/eap/qe/micrometer/prometheus/MicrometerPrometheusTestCase.java
Show resolved
Hide resolved
client.execute("/subsystem=metrics:remove"); | ||
client.execute("/extension=org.wildfly.extension.metrics:remove"); | ||
MicrometerPrometheusSetup.set(client, "/metrics", false); | ||
String response = fetchPrometheusMetricsRequireStatusCode(false, 200); |
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.
IIUC, logically all the above statements should be placed before the try
statement, since you're reverting them in the finally
block, correct?
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.
I updated wfMetricsDisabledTest test method
public void wfMetricsEnabledTest() throws Exception { | ||
try { | ||
MicrometerPrometheusSetup.set(client, "/metrics", false); | ||
Assert.assertTrue( |
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.
IIUC, logically the above statement should be placed before the try
statement, since you're reverting it in the finally
block, correct?
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.
This appears as outdated in the GitHub UI, but it is actually not changes, right @marekkopecky ? See https://github.com/jboss-eap-qe/eap-microprofile-test-suite/pull/345/files#diff-5396f39821558725509335b7744ff52141796bbbbc8c6f4f3764f5e258d71a7bR108
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, I updated it now
9d7c1dd
to
d128eef
Compare
20e59f7
to
411e9ca
Compare
Server
This doesn't work on upstream non-community server.
REST assured library
REST assured authentication doesn't work
and I was not able to figure out how to hardcode Apache Client to it, that's the reason why I'm using RESTEasy. Upstream is using Apache directly: https://github.com/wildfly/wildfly/pull/17857/files#diff-074a5e7f4019eac45c8a7be241dee05f64368102fb7a6e3c93cdd92eec9624ffR124
Default requirements: