Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ tasks.withType<Test>().configureEach {
"-Dpulsar.allocator.out_of_memory_policy=FallbackToHeap",
"-Dpulsar.test.preventExit=true",
)
// Avro 1.12.1+ makes Avro serialization strict
systemProperty("org.apache.avro.SERIALIZABLE_CLASSES", "java.math.BigDecimal,java.math.BigInteger,java.net.URI,java.net.URL,java.io.File,java.lang.Integer")
}

// Expose test classes for cross-module test dependencies (Maven test-jar equivalent)
Expand Down
4 changes: 2 additions & 2 deletions distribution/server/src/assemble/LICENSE.bin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,8 @@ The Apache Software License, Version 2.0
* zt-zip
- org.zeroturnaround-zt-zip-1.17.jar
* Apache Avro
- org.apache.avro-avro-1.12.0.jar
- org.apache.avro-avro-protobuf-1.12.0.jar
- org.apache.avro-avro-1.12.2.jar
- org.apache.avro-avro-protobuf-1.12.2.jar
* Apache Curator
- org.apache.curator-curator-client-5.7.1.jar
- org.apache.curator-curator-framework-5.7.1.jar
Expand Down
4 changes: 2 additions & 2 deletions distribution/shell/src/assemble/LICENSE.bin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,8 @@ The Apache Software License, Version 2.0
* Google Error Prone Annotations - error_prone_annotations-2.45.0.jar
* Javassist -- javassist-3.25.0-GA.jar
* Apache Avro
- avro-1.12.0.jar
- avro-protobuf-1.12.0.jar
- avro-1.12.2.jar
- avro-protobuf-1.12.2.jar
* RE2j -- re2j-1.8.jar
* Spotify completable-futures -- completable-futures-0.3.6.jar
* RoaringBitmap -- RoaringBitmap-1.6.9.jar
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ bouncycastle-bcpkix-fips = "2.0.11"
bouncycastle-bcutil-fips = "2.0.6"
bouncycastle-bc-fips = "2.0.1"
# Serialization
avro = "1.12.0"
avro = "1.12.2"
gson = "2.13.2"
snakeyaml = "2.0"
# Vert.x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
import lombok.CustomLog;
import org.apache.avro.Schema;
import org.apache.pulsar.common.schema.SchemaType;
import org.json.JSONException;
import org.skyscreamer.jsonassert.JSONAssert;
import org.testng.Assert;
import org.testng.annotations.Test;

Expand All @@ -51,7 +53,7 @@ public class ProtobufSchemaTest {
+ "\"avro.java.string\":\"String\"},\"default\":\"\"},{\"name\":\"doubleField\","
+ "\"type\":\"double\",\"default\":0.0},{\"name\":\"intField\",\"type\":\"int\","
+ "\"default\":0},{\"name\":\"testEnum\",\"type\":{\"type\":\"enum\","
+ "\"name\":\"TestEnum\",\"symbols\":[\"SHARED\",\"FAILOVER\"]},"
+ "\"name\":\"TestEnum\",\"symbols\":[\"SHARED\",\"FAILOVER\"],\"default\":\"SHARED\"},"
+ "\"default\":\"SHARED\"},{\"name\":\"nestedField\","
+ "\"type\":[\"null\",{\"type\":\"record\",\"name\":\"SubMessage\","
+ "\"fields\":[{\"name\":\"foo\",\"type\":{\"type\":\"string\","
Expand Down Expand Up @@ -136,7 +138,7 @@ public void testSchemaApiSupportsMessageBound() {
}

@Test
public void testSchema() {
public void testSchema() throws JSONException {
ProtobufSchema<org.apache.pulsar.client.schema.proto.Test.TestMessage> protobufSchema =
ProtobufSchema.of(org.apache.pulsar.client.schema.proto.Test.TestMessage.class);

Expand All @@ -145,8 +147,7 @@ public void testSchema() {
String schemaJson = new String(protobufSchema.getSchemaInfo().getSchema());
Schema.Parser parser = new Schema.Parser();
Schema schema = parser.parse(schemaJson);

Assert.assertEquals(schema.toString(), EXPECTED_SCHEMA_JSON);
JSONAssert.assertEquals(schema.toString(), EXPECTED_SCHEMA_JSON, false);
}

@Test
Expand Down
Loading