You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "lizhanhui (via GitHub)" <gi...@apache.org> on 2023/12/04 11:43:44 UTC

[I] [Bug] Flaky Test RocksDBMessageStoreTest.testMaxOffset [rocketmq]

lizhanhui opened a new issue, #7614:
URL: https://github.com/apache/rocketmq/issues/7614

   ### Before Creating the Bug Report
   
   - [X] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq/discussions).
   
   - [X] I have searched the [GitHub Issues](https://github.com/apache/rocketmq/issues) and [GitHub Discussions](https://github.com/apache/rocketmq/discussions)  of this repository and believe that this is not a duplicate.
   
   - [X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
   
   
   ### Runtime platform environment
   
   CI
   
   ### RocketMQ version
   
   CI
   
   ### JDK Version
   
   CI
   
   ### Describe the Bug
   
   RocksDBMessageStoreTest.testMaxOffset:625 expected:<[3]L> but was:<[1]L>
   
   https://github.com/apache/rocketmq/actions/runs/7083756493/job/19276717683
   
   ### Steps to Reproduce
   
   See CI
   
   ### What Did You Expect to See?
   
   Test should pass 
   
   ### What Did You See Instead?
   
   Test case failed
   
   ### Additional Context
   
   _No response_


-- 
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@rocketmq.apache.org.apache.org

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


Re: [I] [Bug] Flaky Test RocksDBMessageStoreTest.testMaxOffset [rocketmq]

Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin closed issue #7614: [Bug] Flaky Test RocksDBMessageStoreTest.testMaxOffset
URL: https://github.com/apache/rocketmq/issues/7614


-- 
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@rocketmq.apache.org

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


Re: [I] [Bug] Flaky Test RocksDBMessageStoreTest.testMaxOffset [rocketmq]

Posted by "lizhanhui (via GitHub)" <gi...@apache.org>.
lizhanhui commented on issue #7614:
URL: https://github.com/apache/rocketmq/issues/7614#issuecomment-1845069595

   `messageStore.dispatchBehindBytes() != 0` does not guarantee that the store has completed building the queue index. Awaitbility is preferred over sleep-loop.


-- 
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@rocketmq.apache.org

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


Re: [I] [Bug] Flaky Test RocksDBMessageStoreTest.testMaxOffset [rocketmq]

Posted by "yp969803 (via GitHub)" <gi...@apache.org>.
yp969803 commented on issue #7614:
URL: https://github.com/apache/rocketmq/issues/7614#issuecomment-1842048840

   ```
     public void testMaxOffset() throws InterruptedException {
           if (notExecuted()) {
               return;
           }
           int firstBatchMessages = 3;
           int queueId = 0;
           messageBody = storeMessage.getBytes();
   
           assertThat(messageStore.getMaxOffsetInQueue(messageTopic, queueId)).isEqualTo(0);
   
           for (int i = 0; i < firstBatchMessages; i++) {
               final MessageExtBrokerInner msg = buildMessage();
               msg.setQueueId(queueId);
               messageStore.putMessage(msg);
           }
   
           while (messageStore.dispatchBehindBytes() != 0) {
               TimeUnit.MILLISECONDS.sleep(1);
           }
   
           assertThat(messageStore.getMaxOffsetInQueue(messageTopic, queueId)).isEqualTo(firstBatchMessages);
   ```
   
   Didn't find anything wrong in this code dont know why the test is failing


-- 
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@rocketmq.apache.org

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