-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Flaky-test: SchemaServiceTest.testSchemaRegistryMetrics #23457
Comments
Hi, Lari. @lhotari Could you please assign me the issue, I wanna contribute it. :) |
@visxu Thanks for volunteering. This particular issue is tricky since it seems to be caused by lack of sufficient isolation between test runs. Prometheus metrics use static fields and there could be state left over from other executions in the same JVM. One simple solution for this case is to ignore the results from other namespaces on the line where the failure happens. pulsar/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/SchemaServiceTest.java Lines 182 to 198 in a6cee2b
changing the asserts to something like this, perhaps assertThat(deleteLatency).anySatisfy(metric -> {
Assert.assertEquals(metric.tags.get("namespace"), namespace);
Assert.assertTrue(metric.value > 0);
}); |
@visxu You can work on flaky test issues without someone assigning the GitHub issue specifically to you. We don't have many contributors working on these, so commenting on the issue is a good way to indicate to others that you are working on it. There will be unnecessary delays if you wait for the assignment from an Apache Pulsar committer. |
Thanks for your comments and suggestions. |
Use `AssertJ` fluent assertions instead of `for` iterate.
Use `AssertJ` fluent assertions instead of `for` iterate.
Search before asking
Example failure
https://github.com/apache/pulsar/actions/runs/11328656119/job/31502934109?pr=23442#step:11:1338
Exception stacktrace
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: