[jbosstools-commits] JBoss Tools SVN: r31486 - in trunk/runtime/tests/org.jboss.tools.runtime.test: src/org/jboss/tools/runtime/test and 1 other directory.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Wed May 25 14:59:58 EDT 2011


Author: snjeza
Date: 2011-05-25 14:59:57 -0400 (Wed, 25 May 2011)
New Revision: 31486

Modified:
   trunk/runtime/tests/org.jboss.tools.runtime.test/pom.xml
   trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/IRuntimeDetectionConstants.java
   trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionTest.java
Log:
JBIDE-8906 jboss runtime detection doesn't spot AS 7 installations

Modified: trunk/runtime/tests/org.jboss.tools.runtime.test/pom.xml
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/pom.xml	2011-05-25 18:44:30 UTC (rev 31485)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/pom.xml	2011-05-25 18:59:57 UTC (rev 31486)
@@ -12,7 +12,7 @@
 	<packaging>eclipse-test-plugin</packaging>
 
 	<properties>
-		<systemProperties>-Djbosstools.test.jboss.home.4.2=${requirement.build.root}/jboss-4.2.3.GA -Djbosstools.test.jboss.home.5.1=${requirement.build.root}/jboss-5.1.0.GA -Djbosstools.test.seam.2.0.1.GA.home=${requirement.build.root}/jboss-seam-2.0.1.GA -Djbosstools.test.seam.2.2.0.GA.home=${requirement.build.root}/jboss-seam-2.2.0.GA -Djbosstools.test.eap.4.3.home=${requirement.build.root}/jboss-eap-4.3 -Dskip.runtime.scanner=true</systemProperties>
+		<systemProperties>-Djbosstools.test.jboss.home.4.2=${requirement.build.root}/jboss-4.2.3.GA -Djbosstools.test.jboss.home.5.1=${requirement.build.root}/jboss-5.1.0.GA -Djbosstools.test.seam.2.0.1.GA.home=${requirement.build.root}/jboss-seam-2.0.1.GA -Djbosstools.test.seam.2.2.0.GA.home=${requirement.build.root}/jboss-seam-2.2.0.GA -Djbosstools.test.eap.4.3.home=${requirement.build.root}/jboss-eap-4.3 -Dskip.runtime.scanner=true -Djbosstools.test.jboss.home.7.0=${requirement.build.root}/jboss-7.0.0.Beta3</systemProperties>
 	</properties>
 	<build>
 		<plugins>

Modified: trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/IRuntimeDetectionConstants.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/IRuntimeDetectionConstants.java	2011-05-25 18:44:30 UTC (rev 31485)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/IRuntimeDetectionConstants.java	2011-05-25 18:59:57 UTC (rev 31486)
@@ -21,6 +21,8 @@
 
 	final static String JBOSS_51_HOME = System.getProperty("jbosstools.test.jboss.home.5.1", "E:\\JBossRuntime2\\jboss-5.1.0.GA");
 
+	final static String JBOSS_70_HOME = System.getProperty("jbosstools.test.jboss.home.7.0", "E:\\jboss-7.0.0.Beta3");
+
 	final static String SEAM_20_HOME = System.getProperty("jbosstools.test.seam.2.0.1.GA.home", "E:\\JBossRuntimes\\jboss-seam-2.0.1.GA");
 
 	final static String SEAM_22_HOME = System.getProperty("jbosstools.test.seam.2.2.0.GA.home", "E:\\JBossRuntime2\\jboss-seam-2.2.1.Final");

Modified: trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionTest.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionTest.java	2011-05-25 18:44:30 UTC (rev 31485)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionTest.java	2011-05-25 18:59:57 UTC (rev 31486)
@@ -79,6 +79,7 @@
 				.getRuntimePaths();
 		String[] paths = { IRuntimeDetectionConstants.JBOSS_42_HOME,
 				IRuntimeDetectionConstants.JBOSS_51_HOME,
+				IRuntimeDetectionConstants.JBOSS_70_HOME,
 				IRuntimeDetectionConstants.SEAM_20_HOME,
 				IRuntimeDetectionConstants.SEAM_22_HOME,
 				IRuntimeDetectionConstants.EAP_43_HOME };
@@ -136,8 +137,8 @@
 		List<RuntimePath> runtimePaths = RuntimeUIActivator.getDefault()
 				.getRuntimePaths();
 		assertTrue(
-				"runtimePaths.size()\nExpected: 5\nWas: " + runtimePaths.size(),
-				runtimePaths.size() == 5);
+				"runtimePaths.size()\nExpected: 6\nWas: " + runtimePaths.size(),
+				runtimePaths.size() == 6);
 	}
 	
 	@Test
@@ -208,10 +209,10 @@
 				.getDefault().getServerDefinitions();
 		List<RuntimePath> runtimePaths = RuntimeUIActivator.getDefault()
 			.getRuntimePaths();
-		assertTrue("serverDefinitions.size()\nExpected: 5\nWas: "
+		assertTrue("serverDefinitions.size()\nExpected: 6\nWas: "
 				+ serverDefinitions.size() + 
 				"\nserverDefinitions: " + serverDefinitions +
-				"\nruntimePaths=" + runtimePaths, serverDefinitions.size() == 5);
+				"\nruntimePaths=" + runtimePaths, serverDefinitions.size() == 6);
 	}
 
 	@Test
@@ -289,6 +290,19 @@
 		}
 		assertTrue("JBoss AS 5.1\nExpected: 1\nWas: " + count, count == 1);
 	}
+	
+	@Test
+	public void testJBossAs70() {
+		IRuntime[] runtimes = ServerCore.getRuntimes();
+		int count = 0;
+		for (IRuntime runtime : runtimes) {
+			IRuntimeType runtimeType = runtime.getRuntimeType();
+			if (IJBossToolingConstants.AS_70.equals(runtimeType.getId())) {
+				count++;
+			}
+		}
+		assertTrue("JBoss AS 7.0\nExpected: 1\nWas: " + count, count == 1);
+	}
 
 	@Test
 	public void testJBossEap43() {
@@ -306,8 +320,8 @@
 	@Test
 	public void testWtpRuntimes() {
 		IRuntime[] runtimes = ServerCore.getRuntimes();
-		assertTrue("runtimes.length\nExpected: 3\nWas: " + runtimes.length,
-				runtimes.length == 3);
+		assertTrue("runtimes.length\nExpected: 4\nWas: " + runtimes.length,
+				runtimes.length == 4);
 	}
 	
 	@Test



More information about the jbosstools-commits mailing list