nodece commented on code in PR #57:
URL: https://github.com/apache/pulsar-adapters/pull/57#discussion_r1837874084
##########
tests/pulsar-storm-test/src/test/java/org/apache/pulsar/storm/PulsarBoltTest.java:
##########
@@ -175,8 +175,7 @@ public void testMetrics() throws Exception {
Assert.assertEquals(((Long)
metrics.get(PulsarBolt.NO_OF_MESSAGES_SENT)).longValue(), 10);
Assert.assertEquals(((Double)
metrics.get(PulsarBolt.PRODUCER_RATE)).doubleValue(),
10.0 / pulsarBoltConf.getMetricsTimeIntervalInSecs());
- Assert.assertEquals(((Double)
metrics.get(PulsarBolt.PRODUCER_THROUGHPUT_BYTES)).doubleValue(),
- ((double) msgContent.getBytes().length * 10) /
pulsarBoltConf.getMetricsTimeIntervalInSecs());
+ Assert.assertEquals(((Double)
metrics.get(PulsarBolt.PRODUCER_THROUGHPUT_BYTES)).doubleValue(), 0);
Review Comment:
@visxu https://github.com/apache/pulsar/pull/22372 breaks this value,
`content` is null before sending.
Please use `messageSizeSent += ((TypedMessageBuilderImpl<byte[]>)
msgBuilder).getContent().remaining()` in the line 143 of `PulsarBot.java#` .
--
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]