visxu commented on code in PR #57:
URL: https://github.com/apache/pulsar-adapters/pull/57#discussion_r1837602224
##########
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:
<img width="979" alt="image"
src="https://github.com/user-attachments/assets/672544e0-9241-4e7d-8692-288cc169a3c0">
Because `bolt.getValueAndReset()` method sets the
`PulsarBolt.PRODUCER_THROUGHPUT_BYTES` metric to 0, not the expression on
`msgContent.getBytes()` value.
--
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]