CONNECTORS-1685: Disable test setup, too

git-svn-id: https://svn.apache.org/repos/asf/manifoldcf/trunk@1896024 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/APISanityHSQLDBIT.java b/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/APISanityHSQLDBIT.java
index 90eb801..38166ad 100644
--- a/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/APISanityHSQLDBIT.java
+++ b/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/APISanityHSQLDBIT.java
@@ -59,7 +59,9 @@
     throws Exception
   {
     removeTestArea();
-    
+    if (wrongJavaVersion()) {
+      return;
+    }
     try
     {
       //Adding a document in Alfresco via CMIS
@@ -84,20 +86,6 @@
   {
   }
   
-  public static boolean wrongJavaVersion() throws Exception {
-    String version = System.getProperty("java.version");
-    int index = version.indexOf("_");
-    if (index == -1) {
-      return false;
-    }
-    String update = version.substring(index + 1);
-    if (Integer.parseInt(update) <= 255) {
-      return false;
-    }
-    System.err.println("Not running Alfresco integration test because your version of java is incompatible: "+version);
-    return true;
-  }
-  
   @Test
   public void sanityCheck()
     throws Exception
diff --git a/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/BaseITHSQLDB.java b/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/BaseITHSQLDB.java
index e79959b..a12a166 100644
--- a/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/BaseITHSQLDB.java
+++ b/connectors/alfresco-webscript/connector/src/test/java/org/apache/manifoldcf/crawler/connectors/alfrescowebscript/tests/BaseITHSQLDB.java
@@ -54,6 +54,10 @@
   public void setUpAlfresco()
     throws Exception
   {
+    if (wrongJavaVersion()) {
+      return;
+    }
+
     alfrescoServer = new Server(9090);
     alfrescoServer.setStopAtShutdown(true);
 
@@ -84,4 +88,19 @@
       Thread.sleep(5000);
     }
   }
+
+  public static boolean wrongJavaVersion() throws Exception {
+    String version = System.getProperty("java.version");
+    System.out.println(version);
+    int index = version.indexOf("_");
+    if (index == -1) {
+      return false;
+    }
+    String update = version.substring(index + 1);
+    if (Integer.parseInt(update) <= 255) {
+      return false;
+    }
+    System.err.println("Not running Alfresco integration test because your version of java is incompatible: "+version);
+    return true;
+  }
 }