From 7b82be365510ed64ba6c21d67b51be33211a4ab4 Mon Sep 17 00:00:00 2001 From: Alexandre Montplaisir Date: Fri, 31 Jul 2015 16:45:27 -0400 Subject: [PATCH] Use maven-failsafe-plugin instead of surefire to run integration tests Failsafe is slightly more geared towards integration tests: it runs in the "verify" phase instead of the "test" one, and will not fail the build if a test fails, but will report it at the end. Signed-off-by: Alexandre Montplaisir --- README.md | 4 ++-- lttng-ust-java-tests/pom.xml | 21 +++++++++++++++++-- ...TestBase.java => EnabledEventsITBase.java} | 2 +- ...nTestBase.java => MultiSessionITBase.java} | 2 +- ...ventsTest.java => JulEnabledEventsIT.java} | 4 ++-- ...LegacyApiTest.java => JulLegacyApiIT.java} | 2 +- ...essionTest.java => JulMultiSessionIT.java} | 4 ++-- ...ntsTest.java => Log4jEnabledEventsIT.java} | 4 ++-- ...gacyApiTest.java => Log4jLegacyApiIT.java} | 2 +- ...sionTest.java => Log4jMultiSessionIT.java} | 4 ++-- pom.xml | 1 + 11 files changed, 34 insertions(+), 16 deletions(-) rename lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/{EnabledEventsTestBase.java => EnabledEventsITBase.java} (99%) rename lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/{MultiSessionTestBase.java => MultiSessionITBase.java} (99%) rename lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/{JulEnabledEventsTest.java => JulEnabledEventsIT.java} (96%) rename lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/{JulLegacyApiTest.java => JulLegacyApiIT.java} (99%) rename lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/{JulMultiSessionTest.java => JulMultiSessionIT.java} (96%) rename lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/{Log4jEnabledEventsTest.java => Log4jEnabledEventsIT.java} (96%) rename lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/{Log4jLegacyApiTest.java => Log4jLegacyApiIT.java} (99%) rename lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/{Log4jMultiSessionTest.java => Log4jMultiSessionIT.java} (96%) diff --git a/README.md b/README.md index c44a5db..c30e7f3 100644 --- a/README.md +++ b/README.md @@ -54,8 +54,8 @@ so make sure the output mentions succesful tests and not skipped ones. Please make sure you have no `lttng` session active prior to or during the tests, or it might interfere with the test runs! -Detailed JUnit test reports will be available as usual under -`target/surefire-reports/` +Detailed JUnit test reports will be available under +`lttng-ust-java-tests/target/failsafe-reports/` Running the benchmarks diff --git a/lttng-ust-java-tests/pom.xml b/lttng-ust-java-tests/pom.xml index f706c56..c5fecc7 100644 --- a/lttng-ust-java-tests/pom.xml +++ b/lttng-ust-java-tests/pom.xml @@ -34,7 +34,6 @@ LTTng-UST Java Agent Integration Tests - UTF-8 /usr/local/share/java/lttng-ust-agent-common-1.0.0.jar @@ -86,6 +85,24 @@ + + + + org.apache.maven.plugins + maven-failsafe-plugin + 2.18.1 + + + + integration-test + verify + + + + + + + benchmark @@ -93,7 +110,7 @@ org.apache.maven.plugins - maven-surefire-plugin + maven-failsafe-plugin 2.18.1 diff --git a/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/EnabledEventsTestBase.java b/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/EnabledEventsITBase.java similarity index 99% rename from lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/EnabledEventsTestBase.java rename to lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/EnabledEventsITBase.java index fd72279..0e8c9e6 100644 --- a/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/EnabledEventsTestBase.java +++ b/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/EnabledEventsITBase.java @@ -38,7 +38,7 @@ import org.lttng.ust.agent.utils.TestPrintRunner; * presence of enabled events in resulting traces. */ @RunWith(TestPrintRunner.class) -public abstract class EnabledEventsTestBase { +public abstract class EnabledEventsITBase { protected static final String EVENT_NAME_A = "EventA"; protected static final String EVENT_NAME_B = "EventAB"; diff --git a/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/MultiSessionTestBase.java b/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/MultiSessionITBase.java similarity index 99% rename from lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/MultiSessionTestBase.java rename to lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/MultiSessionITBase.java index 1efa3a6..e467f0e 100644 --- a/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/MultiSessionTestBase.java +++ b/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/MultiSessionITBase.java @@ -37,7 +37,7 @@ import org.lttng.ust.agent.utils.TestPrintRunner; * Base abstract class for tests with multiple concurrent tracing sessions */ @RunWith(TestPrintRunner.class) -public abstract class MultiSessionTestBase { +public abstract class MultiSessionITBase { protected static final String EVENT_NAME_A = "EventA"; protected static final String EVENT_NAME_B = "EventAB"; diff --git a/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/JulEnabledEventsTest.java b/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/JulEnabledEventsIT.java similarity index 96% rename from lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/JulEnabledEventsTest.java rename to lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/JulEnabledEventsIT.java index 1e9a07f..d7a31f1 100644 --- a/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/JulEnabledEventsTest.java +++ b/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/JulEnabledEventsIT.java @@ -31,14 +31,14 @@ import org.junit.Before; import org.junit.BeforeClass; import org.lttng.tools.ILttngSession.Domain; import org.lttng.tools.LttngToolsHelper; -import org.lttng.ust.agent.integration.EnabledEventsTestBase; +import org.lttng.ust.agent.integration.EnabledEventsITBase; import org.lttng.ust.agent.jul.LttngLogHandler; import org.lttng.ust.agent.utils.LttngUtils; /** * Enabled events test for the LTTng-UST JUL log handler. */ -public class JulEnabledEventsTest extends EnabledEventsTestBase { +public class JulEnabledEventsIT extends EnabledEventsITBase { private static final Domain DOMAIN = Domain.JUL; diff --git a/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/JulLegacyApiTest.java b/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/JulLegacyApiIT.java similarity index 99% rename from lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/JulLegacyApiTest.java rename to lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/JulLegacyApiIT.java index d053d58..a7abe71 100644 --- a/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/JulLegacyApiTest.java +++ b/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/JulLegacyApiIT.java @@ -48,7 +48,7 @@ import org.lttng.ust.agent.utils.TestPrintRunner; */ @RunWith(TestPrintRunner.class) @SuppressWarnings("deprecation") -public class JulLegacyApiTest { +public class JulLegacyApiIT { private static final Domain DOMAIN = Domain.JUL; diff --git a/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/JulMultiSessionTest.java b/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/JulMultiSessionIT.java similarity index 96% rename from lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/JulMultiSessionTest.java rename to lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/JulMultiSessionIT.java index f377d91..8d71c86 100644 --- a/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/JulMultiSessionTest.java +++ b/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/jul/JulMultiSessionIT.java @@ -31,14 +31,14 @@ import org.junit.Before; import org.junit.BeforeClass; import org.lttng.tools.ILttngSession.Domain; import org.lttng.tools.LttngToolsHelper; -import org.lttng.ust.agent.integration.MultiSessionTestBase; +import org.lttng.ust.agent.integration.MultiSessionITBase; import org.lttng.ust.agent.jul.LttngLogHandler; import org.lttng.ust.agent.utils.LttngUtils; /** * JUL tests for multiple concurrent tracing sessions */ -public class JulMultiSessionTest extends MultiSessionTestBase { +public class JulMultiSessionIT extends MultiSessionITBase { private static final Domain DOMAIN = Domain.JUL; diff --git a/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jEnabledEventsTest.java b/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jEnabledEventsIT.java similarity index 96% rename from lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jEnabledEventsTest.java rename to lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jEnabledEventsIT.java index 0a18b17..02bae94 100644 --- a/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jEnabledEventsTest.java +++ b/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jEnabledEventsIT.java @@ -31,14 +31,14 @@ import org.junit.Before; import org.junit.BeforeClass; import org.lttng.tools.ILttngSession.Domain; import org.lttng.tools.LttngToolsHelper; -import org.lttng.ust.agent.integration.EnabledEventsTestBase; +import org.lttng.ust.agent.integration.EnabledEventsITBase; import org.lttng.ust.agent.log4j.LttngLogAppender; import org.lttng.ust.agent.utils.LttngUtils; /** * Enabled events test for the LTTng-UST Log4j log handler. */ -public class Log4jEnabledEventsTest extends EnabledEventsTestBase { +public class Log4jEnabledEventsIT extends EnabledEventsITBase { private static final Domain DOMAIN = Domain.LOG4J; diff --git a/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jLegacyApiTest.java b/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jLegacyApiIT.java similarity index 99% rename from lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jLegacyApiTest.java rename to lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jLegacyApiIT.java index b0784ce..054fd94 100644 --- a/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jLegacyApiTest.java +++ b/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jLegacyApiIT.java @@ -49,7 +49,7 @@ import org.lttng.ust.agent.utils.TestPrintRunner; */ @RunWith(TestPrintRunner.class) @SuppressWarnings("deprecation") -public class Log4jLegacyApiTest { +public class Log4jLegacyApiIT { private static final Domain DOMAIN = Domain.LOG4J; diff --git a/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jMultiSessionTest.java b/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jMultiSessionIT.java similarity index 96% rename from lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jMultiSessionTest.java rename to lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jMultiSessionIT.java index d573ba1..e9f9458 100644 --- a/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jMultiSessionTest.java +++ b/lttng-ust-java-tests/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jMultiSessionIT.java @@ -31,14 +31,14 @@ import org.junit.Before; import org.junit.BeforeClass; import org.lttng.tools.ILttngSession.Domain; import org.lttng.tools.LttngToolsHelper; -import org.lttng.ust.agent.integration.MultiSessionTestBase; +import org.lttng.ust.agent.integration.MultiSessionITBase; import org.lttng.ust.agent.log4j.LttngLogAppender; import org.lttng.ust.agent.utils.LttngUtils; /** * Log4j tests for multiple concurrent tracing sessions */ -public class Log4jMultiSessionTest extends MultiSessionTestBase { +public class Log4jMultiSessionIT extends MultiSessionITBase { private static final Domain DOMAIN = Domain.LOG4J; diff --git a/pom.xml b/pom.xml index 8dc1781..2c09828 100644 --- a/pom.xml +++ b/pom.xml @@ -35,6 +35,7 @@ UTF-8 + UTF-8 -- 2.34.1