Flaky-test: org.apache.pulsar.client.impl.schema.SchemaInfoTest.testSchemaInfoToString
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
SchemaInfoTest.testSchemaInfoToString is flaky. It fails sporadically.
[example failure](https://github.com/apache/pulsar/runs/7234112994?check_suite_focus=true)
```
Error: Tests run: 9, Failures: 1, Errors: 0, Skipped: 5, Time elapsed: 1.121 s <<< FAILURE! - in org.apache.pulsar.client.impl.schema.SchemaInfoTest
Error: testSchemaInfoToString(org.apache.pulsar.client.impl.schema.SchemaInfoTest) Time elapsed: 0.01 s <<< FAILURE!
java.lang.NullPointerException: Cannot invoke "Object.toString()" because "si" is null
at org.apache.pulsar.client.impl.schema.SchemaInfoTest.testSchemaInfoToString(SchemaInfoTest.java:284)
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.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
at org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:45)
at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:73)
at org.testng.internal.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)
```
Contributor guide
Research direction
Start with SchemaInfoTest.java, specifically testSchemaInfoToString around line 284, and review the test setup that leaves si null in the reported failure. Run the test repeatedly to reproduce the intermittent NullPointerException; done means the test no longer fails sporadically and still verifies SchemaInfo.toString().
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