Replace test skipping with straight failures
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Thu, 18 Feb 2016 22:11:15 +0000 (17:11 -0500)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Thu, 18 Feb 2016 23:45:14 +0000 (18:45 -0500)
Chasing after skipped tests is annoying. If the environment is
not set correctly, that should still count as a failure.

Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
17 files changed:
lttng-ust-java-tests-common/src/test/java/org/lttng/ust/agent/integration/client/TcpClientIT.java
lttng-ust-java-tests-jul/src/test/java/org/lttng/ust/agent/integration/context/JulAppContextIT.java
lttng-ust-java-tests-jul/src/test/java/org/lttng/ust/agent/integration/context/JulAppContextOrderingIT.java
lttng-ust-java-tests-jul/src/test/java/org/lttng/ust/agent/integration/events/JulEnabledEventsIT.java
lttng-ust-java-tests-jul/src/test/java/org/lttng/ust/agent/integration/events/JulLegacyApiIT.java
lttng-ust-java-tests-jul/src/test/java/org/lttng/ust/agent/integration/events/JulListEventsIT.java
lttng-ust-java-tests-jul/src/test/java/org/lttng/ust/agent/integration/events/JulMultiSessionIT.java
lttng-ust-java-tests-jul/src/test/java/org/lttng/ust/agent/integration/filter/JulFilterListenerIT.java
lttng-ust-java-tests-jul/src/test/java/org/lttng/ust/agent/integration/filter/JulFilterListenerOrderingIT.java
lttng-ust-java-tests-log4j/src/test/java/org/lttng/ust/agent/integration/context/Log4jAppContextIT.java
lttng-ust-java-tests-log4j/src/test/java/org/lttng/ust/agent/integration/context/Log4jAppContextOrderingIT.java
lttng-ust-java-tests-log4j/src/test/java/org/lttng/ust/agent/integration/events/Log4jEnabledEventsIT.java
lttng-ust-java-tests-log4j/src/test/java/org/lttng/ust/agent/integration/events/Log4jLegacyApiIT.java
lttng-ust-java-tests-log4j/src/test/java/org/lttng/ust/agent/integration/events/Log4jListEventsIT.java
lttng-ust-java-tests-log4j/src/test/java/org/lttng/ust/agent/integration/events/Log4jMultiSessionIT.java
lttng-ust-java-tests-log4j/src/test/java/org/lttng/ust/agent/integration/filter/Log4jFilterListenerIT.java
lttng-ust-java-tests-log4j/src/test/java/org/lttng/ust/agent/integration/filter/Log4jFilterListenerOrderingIT.java

index ab27da6dd40c8b108c04a61403be6d762fa4e760..69ef96f61f793bbb9a1ac48d597be01717e32566 100644 (file)
@@ -20,7 +20,6 @@ package org.lttng.ust.agent.integration.client;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeTrue;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -97,7 +96,7 @@ public class TcpClientIT {
         clientThread = new Thread(client);
         clientThread.start();
 
-        assumeTrue("Timed out waiting for root sessiond", client.waitForConnection(5));
+        assertTrue("Timed out waiting for root sessiond", client.waitForConnection(5));
     }
 
     /**
index aaecf41ec6ebd30ffd3fbfd0eb6d1061d6dbbe35..a6b3f68fd582fb413a5e2ae6f6c3e82829d86f72 100644 (file)
@@ -18,7 +18,7 @@
 
 package org.lttng.ust.agent.integration.context;
 
-import static org.junit.Assume.assumeTrue;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 import java.util.logging.Handler;
@@ -49,9 +49,9 @@ public class JulAppContextIT extends AppContextITBase {
      */
     @BeforeClass
     public static void julClassSetup() {
-        /* Skip tests if we can't find the JNI library or lttng-tools */
-        assumeTrue(JulTestUtils.checkForJulLibrary());
-        assumeTrue(LttngUtils.checkForLttngTools(Domain.JUL));
+        /* Make sure we can find the JNI library and lttng-tools */
+        assertTrue(JulTestUtils.checkForJulLibrary());
+        assertTrue(LttngUtils.checkForLttngTools(Domain.JUL));
 
         LttngToolsHelper.destroyAllSessions();
     }
index d3a2f6481e27ad775929b94c53ea324e5cc27358..5fbea4cd178ed5d44985f1d3508a6bf77f7fbfa5 100644 (file)
@@ -18,8 +18,8 @@
 
 package org.lttng.ust.agent.integration.context;
 
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
 
 import java.io.IOException;
 import java.util.logging.Handler;
@@ -46,9 +46,9 @@ public class JulAppContextOrderingIT extends AppContextOrderingITBase {
      */
     @BeforeClass
     public static void julClassSetup() {
-        /* Skip tests if we can't find the JNI library or lttng-tools */
-        assumeTrue(JulTestUtils.checkForJulLibrary());
-        assumeTrue(LttngUtils.checkForLttngTools(Domain.JUL));
+        /* Make sure we can find the JNI library and lttng-tools */
+        assertTrue(JulTestUtils.checkForJulLibrary());
+        assertTrue(LttngUtils.checkForLttngTools(Domain.JUL));
 
         LttngToolsHelper.destroyAllSessions();
     }
index 72cb283e9cb82834dc0beeffb940d00bd6f2e327..f5aaaac76de1e2a66cbb1a5ba7db76ba6f541347 100644 (file)
@@ -18,7 +18,7 @@
 
 package org.lttng.ust.agent.integration.events;
 
-import static org.junit.Assume.assumeTrue;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 import java.util.logging.Handler;
@@ -52,9 +52,9 @@ public class JulEnabledEventsIT extends EnabledEventsITBase {
      */
     @BeforeClass
     public static void julClassSetup() {
-        /* Skip tests if we can't find the JNI library or lttng-tools */
-        assumeTrue(JulTestUtils.checkForJulLibrary());
-        assumeTrue(LttngUtils.checkForLttngTools(Domain.JUL));
+        /* Make sure we can find the JNI library and lttng-tools */
+        assertTrue(JulTestUtils.checkForJulLibrary());
+        assertTrue(LttngUtils.checkForLttngTools(Domain.JUL));
 
         LttngToolsHelper.destroyAllSessions();
     }
index 35d70baaf71f8900719a10e4d95054f0502f15d9..88ed2abaea1da7129c2ccb74b8cb6a45d8dcc102 100644 (file)
@@ -22,7 +22,6 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
 
 import java.lang.reflect.Field;
 import java.util.List;
@@ -66,9 +65,9 @@ public class JulLegacyApiIT {
      */
     @BeforeClass
     public static void julClassSetup() {
-        /* Skip tests if we can't find the JNI library or lttng-tools */
-        assumeTrue(JulTestUtils.checkForJulLibrary());
-        assumeTrue(LttngUtils.checkForLttngTools(Domain.JUL));
+        /* Make sure we can find the JNI library and lttng-tools */
+        assertTrue(JulTestUtils.checkForJulLibrary());
+        assertTrue(LttngUtils.checkForLttngTools(Domain.JUL));
 
         LttngToolsHelper.destroyAllSessions();
     }
index 6b78cb273d2961f12462359bee303c97df0eb068..3a4cef60c62d8ae778c455996088e626fd445a0c 100644 (file)
@@ -18,7 +18,7 @@
 
 package org.lttng.ust.agent.integration.events;
 
-import static org.junit.Assume.assumeTrue;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 import java.util.logging.Handler;
@@ -48,9 +48,9 @@ public class JulListEventsIT extends ListEventsITBase {
      */
     @BeforeClass
     public static void testClassSetup() {
-        /* Skip tests if we can't find the JNI library or lttng-tools */
-        assumeTrue(JulTestUtils.checkForJulLibrary());
-        assumeTrue(LttngUtils.checkForLttngTools(Domain.JUL));
+        /* Make sure we can find the JNI library and lttng-tools */
+        assertTrue(JulTestUtils.checkForJulLibrary());
+        assertTrue(LttngUtils.checkForLttngTools(Domain.JUL));
 
         LttngToolsHelper.destroyAllSessions();
     }
index 33116b0d84db0e4d0594aa9a99129dcce929f141..4f34b1ba7093b7d0656468b86a4baeeae3de82da 100644 (file)
@@ -18,7 +18,7 @@
 
 package org.lttng.ust.agent.integration.events;
 
-import static org.junit.Assume.assumeTrue;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 import java.util.logging.Handler;
@@ -53,9 +53,9 @@ public class JulMultiSessionIT extends MultiSessionITBase {
      */
     @BeforeClass
     public static void julClassSetup() {
-        /* Skip tests if we can't find the JNI library or lttng-tools */
-        assumeTrue(JulTestUtils.checkForJulLibrary());
-        assumeTrue(LttngUtils.checkForLttngTools(Domain.JUL));
+        /* Make sure we can find the JNI library and lttng-tools */
+        assertTrue(JulTestUtils.checkForJulLibrary());
+        assertTrue(LttngUtils.checkForLttngTools(Domain.JUL));
 
         LttngToolsHelper.destroyAllSessions();
     }
index 3db70b5cd5f0addeb01a275e5a0cb0a7f9ff3725..70390a415995afcc8269e1b7ddee8d0ffd33562c 100644 (file)
@@ -18,7 +18,7 @@
 
 package org.lttng.ust.agent.integration.filter;
 
-import static org.junit.Assume.assumeTrue;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 
@@ -43,9 +43,9 @@ public class JulFilterListenerIT extends FilterListenerITBase {
      */
     @BeforeClass
     public static void julClassSetup() {
-        /* Skip tests if we can't find the JNI library or lttng-tools */
-        assumeTrue(JulTestUtils.checkForJulLibrary());
-        assumeTrue(LttngUtils.checkForLttngTools(ILttngSession.Domain.JUL));
+        /* Make sure we can find the JNI library and lttng-tools */
+        assertTrue(JulTestUtils.checkForJulLibrary());
+        assertTrue(LttngUtils.checkForLttngTools(ILttngSession.Domain.JUL));
         LttngToolsHelper.destroyAllSessions();
     }
 
index f52b90d5b0d30c37a690dc5d4348280217934ec2..4d599cd180a89554e19a4a9c44b767d1531689b0 100644 (file)
@@ -18,8 +18,8 @@
 
 package org.lttng.ust.agent.integration.filter;
 
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
 
 import java.io.IOException;
 import java.util.logging.Handler;
@@ -27,8 +27,8 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import org.junit.BeforeClass;
-import org.lttng.tools.LttngToolsHelper;
 import org.lttng.tools.ILttngSession.Domain;
+import org.lttng.tools.LttngToolsHelper;
 import org.lttng.ust.agent.jul.LttngLogHandler;
 import org.lttng.ust.agent.utils.JulTestUtils;
 import org.lttng.ust.agent.utils.LttngUtils;
@@ -46,9 +46,9 @@ public class JulFilterListenerOrderingIT extends FilterListenerOrderingITBase {
      */
     @BeforeClass
     public static void julClassSetup() {
-        /* Skip tests if we can't find the JNI library or lttng-tools */
-        assumeTrue(JulTestUtils.checkForJulLibrary());
-        assumeTrue(LttngUtils.checkForLttngTools(Domain.JUL));
+        /* Make sure we can find the JNI library and lttng-tools */
+        assertTrue(JulTestUtils.checkForJulLibrary());
+        assertTrue(LttngUtils.checkForLttngTools(Domain.JUL));
 
         LttngToolsHelper.destroyAllSessions();
     }
index bc8e631dcce4ba48a3b9adcae28dce328154f741..00e8b37be0b617a1905f1d06e8ec144cf0f2e110 100644 (file)
@@ -18,7 +18,7 @@
 
 package org.lttng.ust.agent.integration.context;
 
-import static org.junit.Assume.assumeTrue;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 
@@ -49,9 +49,9 @@ public class Log4jAppContextIT extends AppContextITBase {
      */
     @BeforeClass
     public static void julClassSetup() {
-        /* Skip tests if we can't find the log4j library or lttng-tools */
-        assumeTrue(Log4jTestUtils.checkForLog4jLibrary());
-        assumeTrue(LttngUtils.checkForLttngTools(Domain.LOG4J));
+        /* Make sure we can find the JNI library and lttng-tools */
+        assertTrue(Log4jTestUtils.checkForLog4jLibrary());
+        assertTrue(LttngUtils.checkForLttngTools(Domain.LOG4J));
 
         LttngToolsHelper.destroyAllSessions();
     }
index 7b69351f761e59c875b8b74cb1cec7276cfedb1b..59b7d1bee6cd2b5276213c4704edfbfd5f05cc60 100644 (file)
@@ -18,8 +18,8 @@
 
 package org.lttng.ust.agent.integration.context;
 
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
 
 import java.io.IOException;
 
@@ -46,9 +46,9 @@ public class Log4jAppContextOrderingIT extends AppContextOrderingITBase {
      */
     @BeforeClass
     public static void log4jClassSetup() {
-        /* Skip tests if we can't find the JNI library or lttng-tools */
-        assumeTrue(Log4jTestUtils.checkForLog4jLibrary());
-        assumeTrue(LttngUtils.checkForLttngTools(Domain.LOG4J));
+        /* Make sure we can find the JNI library and lttng-tools */
+        assertTrue(Log4jTestUtils.checkForLog4jLibrary());
+        assertTrue(LttngUtils.checkForLttngTools(Domain.LOG4J));
 
         LttngToolsHelper.destroyAllSessions();
     }
index 1642b6a4a024b40610f932f32f7f16f158c2cc0d..dcca40da005f09f749151cd9701e75a871c55390 100644 (file)
@@ -18,7 +18,7 @@
 
 package org.lttng.ust.agent.integration.events;
 
-import static org.junit.Assume.assumeTrue;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 
@@ -53,9 +53,9 @@ public class Log4jEnabledEventsIT extends EnabledEventsITBase {
      */
     @BeforeClass
     public static void log4jClassSetup() {
-        /* Skip tests if we can't find the JNI library or lttng-tools */
-        assumeTrue(Log4jTestUtils.checkForLog4jLibrary());
-        assumeTrue(LttngUtils.checkForLttngTools(Domain.LOG4J));
+        /* Make sure we can find the JNI library and lttng-tools */
+        assertTrue(Log4jTestUtils.checkForLog4jLibrary());
+        assertTrue(LttngUtils.checkForLttngTools(Domain.LOG4J));
 
         LttngToolsHelper.destroyAllSessions();
     }
index fe613d39d2b5aa1c123aa4e4754a3bdc6586478e..af46cf4dd5c011d0c1b02b523d6911adc593700e 100644 (file)
@@ -22,7 +22,6 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
 
 import java.lang.reflect.Field;
 import java.util.List;
@@ -67,9 +66,9 @@ public class Log4jLegacyApiIT {
      */
     @BeforeClass
     public static void classSetup() {
-        /* Skip tests if we can't find the JNI library or lttng-tools */
-        assumeTrue(Log4jTestUtils.checkForLog4jLibrary());
-        assumeTrue(LttngUtils.checkForLttngTools(Domain.LOG4J));
+        /* Make sure we can find the JNI library and lttng-tools */
+        assertTrue(Log4jTestUtils.checkForLog4jLibrary());
+        assertTrue(LttngUtils.checkForLttngTools(Domain.LOG4J));
 
         LttngToolsHelper.destroyAllSessions();
     }
index e06abf8b26537231a02bc1bde38a093dcd3ebac2..885ba4b3c9b04a8198185396ae92f694ab7616dc 100644 (file)
@@ -18,7 +18,7 @@
 
 package org.lttng.ust.agent.integration.events;
 
-import static org.junit.Assume.assumeTrue;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 
@@ -48,9 +48,9 @@ public class Log4jListEventsIT extends ListEventsITBase {
      */
     @BeforeClass
     public static void testClassSetup() {
-        /* Skip tests if we can't find the JNI library or lttng-tools */
-        assumeTrue(Log4jTestUtils.checkForLog4jLibrary());
-        assumeTrue(LttngUtils.checkForLttngTools(Domain.LOG4J));
+        /* Make sure we can find the JNI library and lttng-tools */
+        assertTrue(Log4jTestUtils.checkForLog4jLibrary());
+        assertTrue(LttngUtils.checkForLttngTools(Domain.LOG4J));
 
         LttngToolsHelper.destroyAllSessions();
     }
index c32a82598936f408ab458f7394c67ff2b58db507..00e71835a7b29846059fe0ab85c439140790a76a 100644 (file)
@@ -18,7 +18,7 @@
 
 package org.lttng.ust.agent.integration.events;
 
-import static org.junit.Assume.assumeTrue;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 
@@ -53,9 +53,9 @@ public class Log4jMultiSessionIT extends MultiSessionITBase {
      */
     @BeforeClass
     public static void log4jClassSetup() {
-        /* Skip tests if we can't find the JNI library or lttng-tools */
-        assumeTrue(Log4jTestUtils.checkForLog4jLibrary());
-        assumeTrue(LttngUtils.checkForLttngTools(Domain.LOG4J));
+        /* Make sure we can find the JNI library and lttng-tools */
+        assertTrue(Log4jTestUtils.checkForLog4jLibrary());
+        assertTrue(LttngUtils.checkForLttngTools(Domain.LOG4J));
 
         LttngToolsHelper.destroyAllSessions();
     }
index d40dd959f4cdab9ba3d8b07f5f58057a19426af2..364796354b7191d7269d0af5f13b804bd021900a 100644 (file)
@@ -18,7 +18,7 @@
 
 package org.lttng.ust.agent.integration.filter;
 
-import static org.junit.Assume.assumeTrue;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 
@@ -43,9 +43,9 @@ public class Log4jFilterListenerIT extends FilterListenerITBase {
      */
     @BeforeClass
     public static void log4jClassSetup() {
-        /* Skip tests if we can't find the JNI library or lttng-tools */
-        assumeTrue(Log4jTestUtils.checkForLog4jLibrary());
-        assumeTrue(LttngUtils.checkForLttngTools(ILttngSession.Domain.LOG4J));
+        /* Make sure we can find the JNI library and lttng-tools */
+        assertTrue(Log4jTestUtils.checkForLog4jLibrary());
+        assertTrue(LttngUtils.checkForLttngTools(ILttngSession.Domain.LOG4J));
         LttngToolsHelper.destroyAllSessions();
     }
 
index 5db9d2ba73594aaeb0e9ba03ede4b000e561f927..0399b71c5aa630cc22a15f23bd3f345187ae08e8 100644 (file)
@@ -18,8 +18,8 @@
 
 package org.lttng.ust.agent.integration.filter;
 
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
 
 import java.io.IOException;
 
@@ -27,8 +27,8 @@ import org.apache.log4j.Appender;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.junit.BeforeClass;
-import org.lttng.tools.LttngToolsHelper;
 import org.lttng.tools.ILttngSession.Domain;
+import org.lttng.tools.LttngToolsHelper;
 import org.lttng.ust.agent.log4j.LttngLogAppender;
 import org.lttng.ust.agent.utils.Log4jTestUtils;
 import org.lttng.ust.agent.utils.LttngUtils;
@@ -46,9 +46,9 @@ public class Log4jFilterListenerOrderingIT extends FilterListenerOrderingITBase
      */
     @BeforeClass
     public static void julClassSetup() {
-        /* Skip tests if we can't find the JNI library or lttng-tools */
-        assumeTrue(Log4jTestUtils.checkForLog4jLibrary());
-        assumeTrue(LttngUtils.checkForLttngTools(Domain.LOG4J));
+        /* Make sure we can find the JNI library and lttng-tools */
+        assertTrue(Log4jTestUtils.checkForLog4jLibrary());
+        assertTrue(LttngUtils.checkForLttngTools(Domain.LOG4J));
 
         LttngToolsHelper.destroyAllSessions();
     }
This page took 0.034799 seconds and 4 git commands to generate.