apache / apache/pulsar

Flaky-test: AdminApiOffloadTest.testSetTopicOffloadPolicies

Open
#19,286 3 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/apache/pulsar/actions/runs/3957519115/jobs/6778166020#step:11:918

### Exception stacktrace

```
Error: Tests run: 28, Failures: 1, Errors: 0, Skipped: 21, Time elapsed: 23.623 s <<< FAILURE! - in org.apache.pulsar.broker.admin.AdminApiOffloadTest
Error: testSetTopicOffloadPolicies(org.apache.pulsar.broker.admin.AdminApiOffloadTest) Time elapsed: 0.043 s <<< FAILURE!
java.lang.AssertionError: expected [300] but found [-1]
at org.testng.Assert.fail(Assert.java:110)
at org.testng.Assert.failNotEquals(Assert.java:1413)
at org.testng.Assert.assertEqualsImpl(Assert.java:149)
at org.testng.Assert.assertEquals(Assert.java:131)
at org.testng.Assert.assertEquals(Assert.java:911)
at org.testng.Assert.assertEquals(Assert.java:945)
at org.apache.pulsar.broker.admin.AdminApiOffloadTest.testSetTopicOffloadPolicies(AdminApiOffloadTest.java:310)
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 with AdminApiOffloadTest.java, especially testSetTopicOffloadPolicies at line 310, and reproduce the failure using the linked GitHub Actions run as context. Trace why the assertion sees -1 instead of 300, then make the test reliable and verify the AdminApiOffloadTest suite passes consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.