This is an automated email from the ASF dual-hosted git repository.
mmarshall pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.10 by this push:
new db3f2c2 [flaky-tests] AdminApiSchemaTest#testSchemaInfoApi (#14508)
db3f2c2 is described below
commit db3f2c269e5d54e858d6184a46ba7724d7862e9e
Author: Nicolò Boschi <[email protected]>
AuthorDate: Mon Mar 7 18:00:57 2022 +0100
[flaky-tests] AdminApiSchemaTest#testSchemaInfoApi (#14508)
* [flaky-tests] AdminApiSchemaTest#testSchemaInfoApi
* use custom json schema
* remove old comment
### Motivation
This is the same fix applied here #12461. The problem with the other pull
is that the `AbstractSchema#clone()` method does return the same instance, so
the fix is not useful at all.
I see this test also failing in 2.8 and 2.9 branch, I recommend to
cherry-pick it.
### Modifications
* Create a new INT schema for the test purpose
- [x] `no-need-doc`
(cherry picked from commit 32c3cd1009eea884e0701143fe01dadf4556e73b)
---
pulsar-broker/src/test/java/org/apache/pulsar/schema/SchemaTest.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
a/pulsar-broker/src/test/java/org/apache/pulsar/schema/SchemaTest.java
b/pulsar-broker/src/test/java/org/apache/pulsar/schema/SchemaTest.java
index 5c83361..3c6f7c7 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/schema/SchemaTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/schema/SchemaTest.java
@@ -707,8 +707,7 @@ public class SchemaTest extends MockedPulsarServiceBaseTest
{
map.put("key", null);
map.put(null, "value"); // null key is not allowed for JSON, it's only
for test here
- // leave INT32 instance unchanged
- final Schema<Integer> integerSchema = Schema.INT32.clone();
+ final Schema<Integer> integerSchema = Schema.JSON(Integer.class);
((SchemaInfoImpl) integerSchema.getSchemaInfo()).setProperties(map);
final Consumer<Integer> consumer =
pulsarClient.newConsumer(integerSchema).topic(topic)