apache / apache/pulsar

Flaky-test: MetadataStoreStatsTest.testMetadataStoreStats

Open
#19,456 9 comments 0 reactions 0 assignees View on GitHub
area/test Stale type/flaky-tests
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.

### Example failure

https://github.com/michaeljmarshall/pulsar/actions/runs/4117926823/jobs/7110068497#step:11:1262

### Exception stacktrace

```
Error: Tests run: 7, Failures: 1, Errors: 0, Skipped: 5, Time elapsed: 18.502 s <<< FAILURE! - in org.apache.pulsar.broker.stats.MetadataStoreStatsTest
Error: testMetadataStoreStats(org.apache.pulsar.broker.stats.MetadataStoreStatsTest) Time elapsed: 0.735 s <<< FAILURE!
java.lang.AssertionError:
Assertion failed with metrics:

(omitted metrics)

expected object to not be null
at org.testng.Assert.fail(Assert.java:110)
at org.testng.Assert.assertNotNull(Assert.java:1319)
at org.apache.pulsar.broker.stats.MetadataStoreStatsTest.testMetadataStoreStats(MetadataStoreStatsTest.java:113)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139)
at org.testng.internal.invokers.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:47)
at org.testng.internal.invokers.InvokeMethodRunnable.call(InvokeMethodRunnable.java:76)
at org.testng.internal.invokers.InvokeMethodRunnable.call(InvokeMethodRunnable.java:11)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
```

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Start by running org.apache.pulsar.broker.stats.MetadataStoreStatsTest.testMetadataStoreStats and inspect the failure at MetadataStoreStatsTest.java:113. Compare repeated runs with the linked CI failure and determine why the expected metrics object is sometimes null. Done means the test reliably passes without weakening its metrics assertion.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.