lhotari commented on code in PR #24102:
URL: https://github.com/apache/pulsar/pull/24102#discussion_r2011664766
##########
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/ProducerConsumerInternalTest.java:
##########
@@ -275,5 +275,20 @@ public void testProducerCompressionMinMsgBodySize() throws
PulsarClientException
message = (MessageImpl<byte[]>) consumer.receive();
compressionType = message.getCompressionType();
assertEquals(compressionType, CompressionType.LZ4);
+
+ // Verify data integrity
+ String data = "compression test message";
+ producer.conf.setBatchingEnabled(true);
+ producer.getConfiguration().setCompressMinMsgBodySize(1);
+ producer.newMessage().value(data.getBytes()).send();
+ message = (MessageImpl<byte[]>) consumer.receive();
+ assertEquals(new String(message.getData()), data);
+
+ producer.conf.setBatchingEnabled(false);
+ producer.getConfiguration().setCompressMinMsgBodySize(1);
+ producer.newMessage().value(data.getBytes()).send();
+ message = (MessageImpl<byte[]>) consumer.receive();
+ assertEquals(new String(message.getData()), data);
Review Comment:
Is there a test to test what was described as a problem in the PR
description?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]