From a302c255ccf3afe88d78539758e227d8d159f237 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Mon, 2 Dec 2019 10:28:20 -0500 Subject: [PATCH] NO-JIRA fixing tests that will fail eventually for the lack of fsync --- .../tests/integration/cluster/bridge/BridgeTest.java | 9 +++++++++ .../tests/integration/persistence/SyncSendTest.java | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) 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 c6d6fa6094..e12c506fed 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,6 +51,7 @@ 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; @@ -97,6 +98,14 @@ 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/persistence/SyncSendTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/SyncSendTest.java index 0ca9d9e1bd..95044f89b7 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/SyncSendTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/SyncSendTest.java @@ -34,6 +34,7 @@ import java.util.concurrent.TimeUnit; import org.apache.activemq.artemis.api.core.RoutingType; import org.apache.activemq.artemis.api.core.SimpleString; +import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.JournalType; import org.apache.activemq.artemis.nativo.jlibaio.LibaioContext; @@ -79,6 +80,13 @@ public class SyncSendTest extends ActiveMQTestBase { this.protocol = protocol; } + @Override + protected ConfigurationImpl createBasicConfig(final int serverID) { + ConfigurationImpl config = super.createBasicConfig(serverID); + config.setJournalDatasync(true).setJournalSyncNonTransactional(true).setJournalSyncTransactional(true); + return config; + } + ActiveMQServer server; @Override @@ -95,8 +103,9 @@ public class SyncSendTest extends ActiveMQTestBase { server.getConfiguration().setJournalType(JournalType.ASYNCIO); } else { server.getConfiguration().setJournalType(JournalType.NIO); - } + + server.getConfiguration().setJournalSyncTransactional(true).setJournalSyncNonTransactional(true).setJournalDatasync(true); server.start(); }