[Bug] [branch-3.0] The test SimpleProducerConsumerTest.testAccessAvroSchemaMetadata always fails
poorbarcode opened this issue · comments
Search before asking
- I searched in the issues and found nothing similar.
Read release policy
- 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
Branch-3.0
Minimal reproduce step
Run the test SimpleProducerConsumerTest.testAccessAvroSchemaMetadata
What did you expect to see?
It should pass.
What did you see instead?
It always fails.
Anything else?
No response
Are you willing to submit a PR?
- I'm willing to submit a PR!
@poorbarcode @Technoboy- PTAL!
The issue was related to the unit testing framework's handling of schema changes. Previously, tests would fail whenever there was a schema change due to lack of proper error handling.
The solution was to restart the server for every test case.
In the latest branch (3.3), the issue has been resolved by introducing try-catch and finally blocks for better error handling within the unit tests.
While the fix in branch 3.3 addresses the immediate issue, consider implementing the following improvements: Use separate topics for each test case to avoid interference due to schema changes.
If two different schemas (e.g., JSON and Avro) were uploaded on different topics, the tests would have passed.