apache / apache/pulsar

Flaky-test: ManagedLedgerTest.testTimestampOnWorkingLedger

Open
#22,430 0 comments 0 reactions 0 assignees View on GitHub
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 failures

- [2024-03-31T12:47:05.5836051Z](https://github.com/apache/pulsar/actions/runs/8498023953/job/23277488610#step:11:111)
- [2024-03-26T12:46:59.0119982Z](https://github.com/apache/pulsar/actions/runs/8435669349/job/23102020026#step:11:11496)

### Exception stacktrace

```
java.lang.AssertionError: well closed LedgerInfo should set a timestamp > 0 expected [true] but found [false]
at org.testng.Assert.fail(Assert.java:110)
at org.testng.Assert.failNotEquals(Assert.java:1577)
at org.testng.Assert.assertTrue(Assert.java:56)
at org.apache.bookkeeper.mledger.impl.ManagedLedgerTest.testTimestampOnWorkingLedger(ManagedLedgerTest.java:2486)
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:840)

```

### Are you willing to submit a PR?

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

Contributor guide

Open the contributing guide

Research direction

Start with ManagedLedgerTest.java at line 2486 and run ManagedLedgerTest.testTimestampOnWorkingLedger, using the linked CI failures as examples. Investigate why the well-closed ledger sometimes has a nonpositive timestamp; done means the test no longer flakes and reliably validates the expected timestamp.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.