Patch for allowing integration tests to run.


git-svn-id: https://svn.apache.org/repos/asf/sis/branches/0.4@1584394 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/core/sis-utility/src/test/java/org/apache/sis/test/TestSuite.java b/core/sis-utility/src/test/java/org/apache/sis/test/TestSuite.java
index 1e33b30..aaaeea1 100644
--- a/core/sis-utility/src/test/java/org/apache/sis/test/TestSuite.java
+++ b/core/sis-utility/src/test/java/org/apache/sis/test/TestSuite.java
@@ -23,7 +23,6 @@
 import java.util.ArrayList;
 import java.io.File;
 import java.net.URL;
-import java.net.URISyntaxException;
 import javax.management.JMException;
 import org.apache.sis.internal.system.Shutdown;
 import org.apache.sis.internal.system.SystemListener;
@@ -55,6 +54,13 @@
     };
 
     /**
+     * {@code true} for disabling the search for missing tests. This is necessary
+     * when the test suites are executed from an external project, for example during a
+     * <a href="https://svn.apache.org/repos/asf/sis/release-test/maven">release test</a>.
+     */
+    static boolean skipCheckForMissingTests;
+
+    /**
      * Creates a new test suite.
      */
     protected TestSuite() {
@@ -64,9 +70,12 @@
      * Verifies that we did not forgot to declare some test classes in the given suite.
      * This method scans the directory for {@code *Test.class} files.
      *
+     * <p>This check is disabled if {@link #skipCheckForMissingTests} is {@code true}.</p>
+     *
      * @param suite The suite for which to check for missing tests.
      */
     protected static void assertNoMissingTest(final Class<? extends TestSuite> suite) {
+        if (skipCheckForMissingTests) return;
         final ClassLoader loader = suite.getClassLoader();
         final URL url = loader.getResource(suite.getName().replace('.', '/') + ".class");
         assertNotNull("Test suite class not found.", url);