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 2022/09/13 13:23:54 UTC

[GitHub] [pulsar] Technoboy- opened a new pull request, #17617: [fix][test] Fix flaky test ResourceGroupUsageAggregationTest. testProduceConsumeUsageOnRG

Technoboy- opened a new pull request, #17617:
URL: https://github.com/apache/pulsar/pull/17617

   Fixes #17120 
   Master Issue: #17120
   
   ### Motivation
   
   The failure assertion is at line 206 :
   ```
   Assert.assertEquals(recvdNumMsgs, topicStats.msgOutCounter);
   ```
   `recvdNumMsgs` must be 10, but `topicStats.msgOutCounter` is from broker side, coming from dispatcher :
   ```
   writeAndFlushPromise.addListener(status -> {
               // only increment counters after the messages have been successfully written to the TCP/IP connection
               if (status.isSuccess()) {
                   msgOut.recordMultipleEvents(totalMessages, totalBytes);
                   msgOutCounter.add(totalMessages);
                   bytesOutCounter.add(totalBytes);
                   chunkedMessageRate.recordMultipleEvents(totalChunkedMessages, 0);
               }
           });
   ```
   So we need to use Awaitility for that assertion.
   
   
   ### Modification
   
   - Remove `for` block, use Map.`get`.
   - Add cleanup logic in order to run the test many times.
   
   
   ### Documentation
   
   
   - [x] `doc-not-needed` 
   (Please explain why)
   
   


-- 
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: commits-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] Technoboy- merged pull request #17617: [fix][test] Fix flaky test ResourceGroupUsageAggregationTest. testProduceConsumeUsageOnRG

Posted by GitBox <gi...@apache.org>.
Technoboy- merged PR #17617:
URL: https://github.com/apache/pulsar/pull/17617


-- 
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: commits-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] Technoboy- closed pull request #17617: [fix][test] Fix flaky test ResourceGroupUsageAggregationTest. testProduceConsumeUsageOnRG

Posted by GitBox <gi...@apache.org>.
Technoboy- closed pull request #17617: [fix][test] Fix flaky test ResourceGroupUsageAggregationTest. testProduceConsumeUsageOnRG
URL: https://github.com/apache/pulsar/pull/17617


-- 
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: commits-unsubscribe@pulsar.apache.org

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