This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 8f357b0e4d2 [fix][test] Fixed Nondeterministic Ordering in 
SchemaInfoTest (#24969)
8f357b0e4d2 is described below

commit 8f357b0e4d20154699dff130f84b69bf2755cf03
Author: Lucas Eby <[email protected]>
AuthorDate: Tue Nov 11 07:40:08 2025 -0600

    [fix][test] Fixed Nondeterministic Ordering in SchemaInfoTest (#24969)
---
 .../org/apache/pulsar/client/impl/schema/SchemaInfoTest.java  | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git 
a/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/SchemaInfoTest.java
 
b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/SchemaInfoTest.java
index f3a16ba1f90..dab683beb96 100644
--- 
a/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/SchemaInfoTest.java
+++ 
b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/SchemaInfoTest.java
@@ -25,6 +25,9 @@ import org.apache.pulsar.client.api.Schema;
 import org.apache.pulsar.common.schema.KeyValueEncodingType;
 import org.apache.pulsar.common.schema.SchemaInfo;
 import org.apache.pulsar.common.schema.SchemaType;
+import org.json.JSONException;
+import org.skyscreamer.jsonassert.JSONAssert;
+import org.skyscreamer.jsonassert.JSONCompareMode;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
@@ -289,8 +292,8 @@ public class SchemaInfoTest {
     }
 
     @Test(dataProvider = "schemas")
-    public void testSchemaInfoToString(SchemaInfo si, String jsonifiedStr) {
-        assertEquals(si.toString(), jsonifiedStr);
+    public void testSchemaInfoToString(SchemaInfo si, String jsonifiedStr) 
throws JSONException {
+        JSONAssert.assertEquals(si.toString(), jsonifiedStr, 
JSONCompareMode.NON_EXTENSIBLE);
     }
 
     public static class SchemaInfoBuilderTest {
@@ -327,7 +330,7 @@ public class SchemaInfoTest {
         }
 
         @Test
-        public void testNullPropertyValue() {
+        public void testNullPropertyValue() throws JSONException {
             final Map<String, String> map = new HashMap<>();
             map.put("key", null);
 
@@ -339,7 +342,7 @@ public class SchemaInfoTest {
                     .build();
 
             // null key will be skipped by Gson when serializing JSON to String
-            assertEquals(si.toString(), INT32_SCHEMA_INFO);
+            JSONAssert.assertEquals(si.toString(), INT32_SCHEMA_INFO, 
JSONCompareMode.NON_EXTENSIBLE);
         }
     }
 }

Reply via email to