[
https://issues.apache.org/jira/browse/ARTEMIS-1326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16116651#comment-16116651
]
ASF GitHub Bot commented on ARTEMIS-1326:
-----------------------------------------
Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1444#discussion_r131669696
--- Diff:
tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/TimedBufferTest.java
---
@@ -195,24 +194,22 @@ public void onError(int errorCode, String
errorMessage) {
timedBuffer.addBytes(buff, true, callback);
Assert.assertTrue(latchFlushed.await(5, TimeUnit.SECONDS));
latchFlushed.setCount(5);
-
-
- flushes.set(0);
-
- // Sending like crazy... still some wait (1 millisecond) between
each send..
+ //Sending like crazy... still some wait (1 millisecond) between
each send..
+ //The writes will be performed during a timeout interval (it can
take < timeout time to do that!)
long time = System.currentTimeMillis();
for (int i = 0; i < 5; i++) {
timedBuffer.addBytes(buff, true, callback);
Thread.sleep(1);
}
Assert.assertTrue(latchFlushed.await(5, TimeUnit.SECONDS));
-
+ //The TimedBuffer will wait until timeout expiration to perform
any additional write
--- End diff --
this was already done on this test.
> testTimeOnTimedBuffer incorrect timeout count
> ---------------------------------------------
>
> Key: ARTEMIS-1326
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1326
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Francesco Nigro
> Assignee: Francesco Nigro
>
> The test isn't evaluating the timeout expiration while writing in batches
> into the TimedBuffer
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)