apache / apache/pulsar

[Bug][Test] NonPersistentTopicMessagingTest does not cover Non-Persistent topics

Open
#23,541 1 comment 0 reactions 0 assignees View on GitHub
type/bug
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.

### Read release policy

- [X] I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

### Version

4.0

### Minimal reproduce step

run NonPersistentTopicMessagingTest

### What did you expect to see?

NonPersistentTopicMessagingTest should use non-persistent topics

### What did you see instead?

NonPersistentTopicMessagingTest uses persistent topics

### Anything else?

https://github.com/apache/pulsar/blob/master/tests/integration/src/test/java/org/apache/pulsar/tests/integration/messaging/MessagingBase.java#L57

https://github.com/apache/pulsar/blob/master/tests/integration/src/test/java/org/apache/pulsar/tests/integration/messaging/MessagingBase.java#L65

In the above test code, we don't pass the `isPersistent` input when generating topic names.

If I fix the above code and run the test, the test fails. There might be some bugs around here.

### Are you willing to submit a PR?

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

Contributor guide

Open the contributing guide

Research direction

Read tests/integration/src/test/java/org/apache/pulsar/tests/integration/messaging/MessagingBase.java at the referenced topic-generation code, then inspect NonPersistentTopicMessagingTest. Run that test before and after ensuring the non-persistent topic input is used; done means the test exercises non-persistent topics and passes, with any resulting failures understood and addressed.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.