This is an automated email from the ASF dual-hosted git repository. mmarshall pushed a commit to branch branch-2.8 in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 0f72a4ff1f21ecf9815290a78be2ab2ea48cecc7 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 999b264..d1340c1 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 @@ -703,8 +703,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)
