jbertram commented on PR #6020:
URL: 
https://github.com/apache/activemq-artemis/pull/6020#issuecomment-3468221790

   Nice find! A single character bug fix.
   
   I recommend removing your existing test and adding this to the tests in 
`activemq-core-client`:
   ```java
   package org.apache.activemq.artemis.core.client.impl;
   
   import org.junit.jupiter.api.Test;
   import org.junit.jupiter.api.Timeout;
   import org.mockito.Mockito;
   
   public class AsynchronousProducerCreditsImplTest {
   
      @Test
      @Timeout(10)
      public void testZeroCredits() throws Exception {
         ClientSessionInternal session = 
Mockito.mock(ClientSessionInternal.class);
         AsynchronousProducerCreditsImpl producerCredits = new 
AsynchronousProducerCreditsImpl(session, null, 0, 
Mockito.mock(ClientProducerFlowCallback.class));
         producerCredits.receiveCredits(0);
         Mockito.verify(session).sendProducerCreditsMessage(0, null);
      }
   }
   ```
   This test is simpler, faster, and reproduces the problem every time.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to