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 2020/10/28 04:16:34 UTC

[GitHub] [pulsar] shiv4289 commented on a change in pull request #8173: [Issue 8154] [Python client] Expose schema version (of writerSchema) in Message

shiv4289 commented on a change in pull request #8173:
URL: https://github.com/apache/pulsar/pull/8173#discussion_r513170599



##########
File path: pulsar-client-cpp/python/schema_test.py
##########
@@ -354,6 +354,32 @@ class Example(Record):
         self.assertEqual(r2.__class__.__name__, 'Example')
         self.assertEqual(r2, r)
 
+    def test_schema_version(self):
+        class Example(Record):
+            a = Integer()
+            b = Integer()
+
+        client = pulsar.Client(self.serviceUrl)
+        producer = client.create_producer(
+                        'my-avro-python-schema-version-topic',
+                        schema=AvroSchema(Example))
+
+        r = Example(a=1, b=2)
+        producer.send(r)
+
+        consumer = client.subscribe('my-avro-python-schema-version-topic', 'sub-1',
+                                    schema=AvroSchema(Example))

Review comment:
       Done, thanks for spotting that.




----------------------------------------------------------------
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