NO-JIRA fixing tests that will fail eventually for the lack of fsync

This commit is contained in:
Clebert Suconic 2019-12-02 10:28:20 -05:00
parent 1ba1de4248
commit a302c255cc
2 changed files with 19 additions and 1 deletions

View File

@ -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}});

View File

@ -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();
}