activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [activemq-artemis] branch master updated: NO-JIRA Fixing intermittent failure
Date Tue, 03 Dec 2019 20:54:22 GMT
This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/master by this push:
     new c699b5e  NO-JIRA Fixing intermittent failure
c699b5e is described below

commit c699b5ed1d7da10fe3e6e38dc675581c5bcdaf2a
Author: Clebert Suconic <clebertsuconic@apache.org>
AuthorDate: Tue Dec 3 15:36:24 2019 -0500

    NO-JIRA Fixing intermittent failure
---
 .../artemis/tests/integration/cluster/bridge/BridgeTest.java  |  9 ---------
 .../activemq/artemis/tests/integration/server/LVQTest.java    | 11 ++++++-----
 2 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
index e12c506..c6d6fa6 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
@@ -51,7 +51,6 @@ import org.apache.activemq.artemis.core.config.BridgeConfiguration;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.config.CoreQueueConfiguration;
 import org.apache.activemq.artemis.core.config.TransformerConfiguration;
-import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl;
 import org.apache.activemq.artemis.core.io.SequentialFileFactory;
 import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory;
 import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
@@ -98,14 +97,6 @@ public class BridgeTest extends ActiveMQTestBase {
 
    private final boolean netty;
 
-
-   @Override
-   protected ConfigurationImpl createBasicConfig(final int serverID) {
-      ConfigurationImpl config = super.createBasicConfig(serverID);
-      config.setJournalDatasync(true).setJournalSyncNonTransactional(true).setJournalSyncTransactional(true);
-      return config;
-   }
-
    @Parameterized.Parameters(name = "isNetty={0}")
    public static Collection getParameters() {
       return Arrays.asList(new Object[][]{{true}, {false}});
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/LVQTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/LVQTest.java
index 3273c16..f91e479 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/LVQTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/LVQTest.java
@@ -710,19 +710,19 @@ public class LVQTest extends ActiveMQTestBase {
       producer.send(m1);
       LinkedListIterator<MessageReference> browserIterator = queue.browserIterator();
       // Wait for message delivered to queue
-      Wait.assertTrue(() -> browserIterator.hasNext(), 10, 2);
+      Wait.assertTrue(() -> browserIterator.hasNext(), 10_000, 2);
       long messageId = browserIterator.next().getMessage().getMessageID();
       browserIterator.close();
 
       queue.deleteReference(messageId);
       // Wait for delete tx's afterCommit called
-      Wait.assertEquals(0L, () -> queue.getDeliveringSize(), 10, 2);
+      Wait.assertEquals(0L, () -> queue.getDeliveringSize(), 10_000, 2);
       assertEquals(queue.getPersistentSize(), 0);
       assertTrue(((LastValueQueue)queue).getLastValueKeys().isEmpty());
 
       producer.send(m2);
       // Wait for message delivered to queue
-      Wait.assertTrue(() -> queue.getPersistentSize() > 10 * 1024, 10, 2);
+      Wait.assertTrue(() -> queue.getPersistentSize() > 10 * 1024, 10_000, 2);
       assertEquals(queue.getDeliveringSize(), 0);
    }
 
@@ -735,16 +735,17 @@ public class LVQTest extends ActiveMQTestBase {
 
       Queue queue = server.locateQueue(qName1);
       producer.send(m1);
+      Wait.assertEquals(1, queue::getMessageCount);
       LinkedListIterator<MessageReference> browserIterator = queue.browserIterator();
       // Wait for message delivered to queue
-      Wait.assertTrue(() -> browserIterator.hasNext(), 10, 2);
+      Assert.assertTrue(browserIterator.hasNext());
       long messageId = browserIterator.next().getMessage().getMessageID();
       browserIterator.close();
       long oldSize = queue.getPersistentSize();
 
       assertTrue(queue.changeReferencePriority(messageId, (byte) 1));
       // Wait for message delivered to queue
-      Wait.assertEquals(oldSize, () -> queue.getPersistentSize(), 10, 2);
+      Wait.assertEquals(oldSize, () -> queue.getPersistentSize(), 10_000, 2);
       assertEquals(queue.getDeliveringSize(), 0);
    }
 


Mime
View raw message