apache / apache/pulsar

[test] NPE of StringSchema for branch-2.10

Open
#16,000 4 comments 0 reactions 0 assignees View on GitHub
area/test Stale
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

**Describe the bug**
https://github.com/apache/pulsar/runs/6812506434?check_suite_focus=true

```
Error: Tests run: 4, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 7.561 s <<< FAILURE! - in org.apache.pulsar.broker.service.BrokerServiceBundlesCacheInvalidationTest
Error: testRecreateNamespace(org.apache.pulsar.broker.service.BrokerServiceBundlesCacheInvalidationTest) Time elapsed: 0.2 s <<< FAILURE!
java.lang.NullPointerException
at java.base/java.lang.String.getBytes(String.java:963)
at org.apache.pulsar.client.impl.schema.StringSchema.encode(StringSchema.java:98)
at org.apache.pulsar.client.impl.schema.StringSchema.encode(StringSchema.java:34)
at org.apache.pulsar.client.impl.TypedMessageBuilderImpl.value(TypedMessageBuilderImpl.java:173)
at org.apache.pulsar.client.impl.ProducerBase.send(ProducerBase.java:62)
at org.apache.pulsar.broker.service.BrokerServiceBundlesCacheInvalidationTest.testRecreateNamespace(BrokerServiceBundlesCacheInvalidationTest.java:57)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
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:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
```

**To Reproduce**
Always fail on CI but it's not able to reproduce on my laptop

Contributor guide

Open the contributing guide

Research direction

Start with org.apache.pulsar.broker.service.BrokerServiceBundlesCacheInvalidationTest.testRecreateNamespace at line 57 and follow the call into org.apache.pulsar.client.impl.schema.StringSchema.encode at line 98. Reproduce the CI failure if possible, then determine why the value passed to StringSchema is null; done means the test no longer throws the NullPointerException and the relevant CI check passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
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.