NO-JIRA: speeding up ArtemisTest

Before this change tests could take a long time on certain laptops.
We don't need to perform the auto-tune journal for these tests.

(cherry-picked from 235b9082d8)
This commit is contained in:
Clebert Suconic 2017-02-07 11:26:35 -05:00
parent bc8c831722
commit 1ed6ace941
1 changed files with 11 additions and 11 deletions

View File

@ -149,8 +149,8 @@ public class ArtemisTest {
@Test @Test
public void testSync() throws Exception { public void testSync() throws Exception {
int writes = 20; int writes = 2;
int tries = 10; int tries = 5;
long totalAvg = SyncCalculation.syncTest(temporaryFolder.getRoot(), 4096, writes, tries, true, true, JournalType.NIO); long totalAvg = SyncCalculation.syncTest(temporaryFolder.getRoot(), 4096, writes, tries, true, true, JournalType.NIO);
System.out.println(); System.out.println();
System.out.println("TotalAvg = " + totalAvg); System.out.println("TotalAvg = " + totalAvg);
@ -164,7 +164,7 @@ public class ArtemisTest {
public void testSimpleCreate() throws Exception { public void testSimpleCreate() throws Exception {
//instance1: default using http //instance1: default using http
File instance1 = new File(temporaryFolder.getRoot(), "instance1"); File instance1 = new File(temporaryFolder.getRoot(), "instance1");
Artemis.main("create", instance1.getAbsolutePath(), "--silent", "--no-fsync"); Artemis.main("create", instance1.getAbsolutePath(), "--silent", "--no-fsync", "--no-autotune");
} }
@ -173,7 +173,7 @@ public class ArtemisTest {
try { try {
//instance1: default using http //instance1: default using http
File instance1 = new File(temporaryFolder.getRoot(), "instance1"); File instance1 = new File(temporaryFolder.getRoot(), "instance1");
Artemis.main("create", instance1.getAbsolutePath(), "--silent", "--mapped"); Artemis.main("create", instance1.getAbsolutePath(), "--silent", "--mapped", "--no-autotune");
} catch (Throwable e) { } catch (Throwable e) {
e.printStackTrace(); e.printStackTrace();
throw e; throw e;
@ -186,7 +186,7 @@ public class ArtemisTest {
Run.setEmbedded(true); Run.setEmbedded(true);
//instance1: default using http //instance1: default using http
File instance1 = new File(temporaryFolder.getRoot(), "instance1"); File instance1 = new File(temporaryFolder.getRoot(), "instance1");
Artemis.main("create", instance1.getAbsolutePath(), "--silent", "--no-fsync"); Artemis.main("create", instance1.getAbsolutePath(), "--silent", "--no-fsync", "--no-autotune");
File bootstrapFile = new File(new File(instance1, "etc"), "bootstrap.xml"); File bootstrapFile = new File(new File(instance1, "etc"), "bootstrap.xml");
assertTrue(bootstrapFile.exists()); assertTrue(bootstrapFile.exists());
Document config = parseXml(bootstrapFile); Document config = parseXml(bootstrapFile);
@ -205,7 +205,7 @@ public class ArtemisTest {
//instance2: https //instance2: https
File instance2 = new File(temporaryFolder.getRoot(), "instance2"); File instance2 = new File(temporaryFolder.getRoot(), "instance2");
Artemis.main("create", instance2.getAbsolutePath(), "--silent", "--ssl-key", "etc/keystore", "--ssl-key-password", "password1", "--no-fsync"); Artemis.main("create", instance2.getAbsolutePath(), "--silent", "--ssl-key", "etc/keystore", "--ssl-key-password", "password1", "--no-fsync", "--no-autotune");
bootstrapFile = new File(new File(instance2, "etc"), "bootstrap.xml"); bootstrapFile = new File(new File(instance2, "etc"), "bootstrap.xml");
assertTrue(bootstrapFile.exists()); assertTrue(bootstrapFile.exists());
config = parseXml(bootstrapFile); config = parseXml(bootstrapFile);
@ -226,7 +226,7 @@ public class ArtemisTest {
//instance3: https with clientAuth //instance3: https with clientAuth
File instance3 = new File(temporaryFolder.getRoot(), "instance3"); File instance3 = new File(temporaryFolder.getRoot(), "instance3");
Artemis.main("create", instance3.getAbsolutePath(), "--silent", "--ssl-key", "etc/keystore", "--ssl-key-password", "password1", "--use-client-auth", "--ssl-trust", "etc/truststore", "--ssl-trust-password", "password2", "--no-fsync"); Artemis.main("create", instance3.getAbsolutePath(), "--silent", "--ssl-key", "etc/keystore", "--ssl-key-password", "password1", "--use-client-auth", "--ssl-trust", "etc/truststore", "--ssl-trust-password", "password2", "--no-fsync", "--no-autotune");
bootstrapFile = new File(new File(instance3, "etc"), "bootstrap.xml"); bootstrapFile = new File(new File(instance3, "etc"), "bootstrap.xml");
assertTrue(bootstrapFile.exists()); assertTrue(bootstrapFile.exists());
@ -259,7 +259,7 @@ public class ArtemisTest {
Run.setEmbedded(true); Run.setEmbedded(true);
File instance1 = new File(temporaryFolder.getRoot(), "instance_user"); File instance1 = new File(temporaryFolder.getRoot(), "instance_user");
System.setProperty("java.security.auth.login.config", instance1.getAbsolutePath() + "/etc/login.config"); System.setProperty("java.security.auth.login.config", instance1.getAbsolutePath() + "/etc/login.config");
Artemis.main("create", instance1.getAbsolutePath(), "--silent"); Artemis.main("create", instance1.getAbsolutePath(), "--silent", "--no-autotune");
System.setProperty("artemis.instance", instance1.getAbsolutePath()); System.setProperty("artemis.instance", instance1.getAbsolutePath());
File userFile = new File(instance1.getAbsolutePath() + "/etc/artemis-users.properties"); File userFile = new File(instance1.getAbsolutePath() + "/etc/artemis-users.properties");
@ -404,7 +404,7 @@ public class ArtemisTest {
Run.setEmbedded(true); Run.setEmbedded(true);
File instance1 = new File(temporaryFolder.getRoot(), "instance_user"); File instance1 = new File(temporaryFolder.getRoot(), "instance_user");
System.setProperty("java.security.auth.login.config", instance1.getAbsolutePath() + "/etc/login.config"); System.setProperty("java.security.auth.login.config", instance1.getAbsolutePath() + "/etc/login.config");
Artemis.main("create", instance1.getAbsolutePath(), "--silent"); Artemis.main("create", instance1.getAbsolutePath(), "--silent", "--no-autotune");
System.setProperty("artemis.instance", instance1.getAbsolutePath()); System.setProperty("artemis.instance", instance1.getAbsolutePath());
File userFile = new File(instance1.getAbsolutePath() + "/etc/artemis-users.properties"); File userFile = new File(instance1.getAbsolutePath() + "/etc/artemis-users.properties");
@ -559,7 +559,7 @@ public class ArtemisTest {
Artemis.main("create", instanceFolder.getAbsolutePath(), "--force", "--silent", "--no-web", "--no-autotune", "--require-login"); Artemis.main("create", instanceFolder.getAbsolutePath(), "--force", "--silent", "--no-web", "--no-autotune", "--require-login");
System.setProperty("artemis.instance", instanceFolder.getAbsolutePath()); System.setProperty("artemis.instance", instanceFolder.getAbsolutePath());
Artemis.main("perf-journal", "--journal-type", "NIO", "--writes", "5000", "--tries", "50", "--verbose"); Artemis.main("perf-journal", "--journal-type", "NIO", "--writes", "5", "--tries", "1", "--verbose");
} }
@ -653,7 +653,7 @@ public class ArtemisTest {
// This is usually set when run from the command line via artemis.profile // This is usually set when run from the command line via artemis.profile
Run.setEmbedded(true); Run.setEmbedded(true);
Artemis.main("create", instanceFolder.getAbsolutePath(), "--force", "--silent", "--no-web", "--queues", queues, "--topics", topics, "--no-autotune", "--require-login", "--ping", "127.0.0.1"); Artemis.main("create", instanceFolder.getAbsolutePath(), "--force", "--silent", "--no-web", "--queues", queues, "--topics", topics, "--no-autotune", "--require-login", "--ping", "127.0.0.1", "--no-autotune");
System.setProperty("artemis.instance", instanceFolder.getAbsolutePath()); System.setProperty("artemis.instance", instanceFolder.getAbsolutePath());
FileConfiguration fc = new FileConfiguration(); FileConfiguration fc = new FileConfiguration();