activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [16/17] activemq-artemis git commit: NO-JIRA fixing TimedbufferTest as fixed on master
Date Tue, 26 Sep 2017 18:49:04 GMT
NO-JIRA fixing TimedbufferTest as fixed on master


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/e03c41aa
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/e03c41aa
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/e03c41aa

Branch: refs/heads/1.x
Commit: e03c41aabd69a0841ec2d4e59b333219b6f504be
Parents: 313e816
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Tue Sep 26 14:43:56 2017 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Tue Sep 26 14:43:56 2017 -0400

----------------------------------------------------------------------
 .../artemis/tests/unit/core/journal/impl/TimedBufferTest.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e03c41aa/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/TimedBufferTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/TimedBufferTest.java
b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/TimedBufferTest.java
index bddb7ea..165fd6e 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/TimedBufferTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/TimedBufferTest.java
@@ -204,7 +204,10 @@ public class TimedBufferTest extends ActiveMQTestBase {
          Assert.assertTrue(latchFlushed.await(5, TimeUnit.SECONDS));
 
          // The purpose of the timed buffer is to batch writes up to a millisecond.. or up
to the size of the buffer.
-         Assert.assertTrue("Timed Buffer is not batching accordingly, it was expected to
take at least 500 seconds batching multiple writes while it took " + (System.currentTimeMillis()
- time) + " milliseconds", System.currentTimeMillis() - time >= 500);
+         Assert.assertTrue("Timed Buffer is not batching accordingly, it was expected to
take at least 500 seconds batching multiple writes while it took " + (System.currentTimeMillis()
- time) + " milliseconds", System.currentTimeMillis() - time >= 450);
+
+         // ^^ there are some discounts that can happen inside the timed buffer that are
still considered valid (like discounting the time it took to perform the operation itself
+         // for that reason the test has been failing (before this commit) at 499 or 480
milliseconds. So, I'm using a reasonable number close to 500 milliseconds that would still
be valid for the test
 
          // it should be in fact only writing once..
          // i will set for 3 just in case there's a GC or anything else happening on the
test


Mime
View raw message