You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/04/29 11:48:52 UTC

[GitHub] [pulsar] vroyer commented on a change in pull request #10428: [Issue #10427] Add AvroSchema UUID support fix

vroyer commented on a change in pull request #10428:
URL: https://github.com/apache/pulsar/pull/10428#discussion_r622975597



##########
File path: pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/AvroSchemaTest.java
##########
@@ -423,4 +425,16 @@ public void testAvroSchemaUserDefinedReadAndWriter() {
         assertEquals(field1, foo.getField1());
     }
 
+    static class MyPojo {
+        public UUID uid;
+    }
+
+    @Test
+    public void testAvroUUID() {
+        org.apache.pulsar.client.api.Schema schema = org.apache.pulsar.client.api.Schema.AVRO(MyPojo.class);
+        MyPojo pojo = new MyPojo();
+        pojo.uid = UUID.randomUUID();
+        schema.encode(pojo);

Review comment:
       Added Schema.decode and test the result, it's ok.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org