[jbosstools-commits] JBoss Tools SVN: r44113 - in trunk/as: tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/internal and 1 other directories.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Fri Sep 28 05:24:18 EDT 2012
Author: rob.stryker at jboss.com
Date: 2012-09-28 05:24:17 -0400 (Fri, 28 Sep 2012)
New Revision: 44113
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java
trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/internal/MockPublishMethod4.java
trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/publishing/AbstractPublishingTest.java
trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/publishing/SingleDeployableFolderTest.java
Log:
unit test cleanup dear god hope it works
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java 2012-09-28 08:38:43 UTC (rev 44112)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java 2012-09-28 09:24:17 UTC (rev 44113)
@@ -113,7 +113,8 @@
}
/**
- * Gets the actual deploy path for this module
+ * Gets the actual deploy path for this module, including all
+ * sub-module folders.
*
* @param moduleTree
* @param server
@@ -123,6 +124,14 @@
return server.getDeploymentLocation(moduleTree, true);
}
+ /**
+ * Gets the actual temp deploy root folder. Do Not deep-dive
+ * into sub-modules
+ *
+ * @param moduleTree
+ * @param server
+ * @return
+ */
protected IPath getTempDeployPath(IModule[] moduleTree, IDeployableServer server) {
return server.getTempDeploymentLocation(moduleTree, false);
}
@@ -402,9 +411,8 @@
monitor.beginTask("Copying Child Module: " + moduleTree[moduleTree.length-1].getName(), 100); //$NON-NLS-1$
try {
IPath destinationPath = getDeployPath(moduleTree, server);
- IPath tempDeployPath = getTempDeployPath(moduleTree, server);
+ IPath tempDeployFolder = getTempDeployPath(moduleTree, server);
IPath destinationFolder = destinationPath.removeLastSegments(1);
- IPath tempDeployFolder = tempDeployPath.removeLastSegments(1);
IPath safeDest = getRootPath(destinationFolder).append(destinationFolder);
IPath safeTempDest = getRootPath(tempDeployFolder).append(tempDeployFolder);
Modified: trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/internal/MockPublishMethod4.java
===================================================================
--- trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/internal/MockPublishMethod4.java 2012-09-28 08:38:43 UTC (rev 44112)
+++ trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/internal/MockPublishMethod4.java 2012-09-28 09:24:17 UTC (rev 44113)
@@ -121,7 +121,7 @@
throw error;
}
if( tempRoot != null && !(new Path(expectedTempRoot).isPrefixOf(tempRoot))) {
- String e = "Expected " + new Path(expectedTempRoot) + " but got: " + root.toString();
+ String e = "Expected " + new Path(expectedTempRoot) + " but got: " + tempRoot.toString();
System.out.println(e);
error = new RuntimeException("Unacceptable use of callback handler: " + e);
throw error;
Modified: trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/publishing/AbstractPublishingTest.java
===================================================================
--- trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/publishing/AbstractPublishingTest.java 2012-09-28 08:38:43 UTC (rev 44112)
+++ trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/publishing/AbstractPublishingTest.java 2012-09-28 09:24:17 UTC (rev 44113)
@@ -168,7 +168,7 @@
if( param_deployLoc.equals(ServerParameterUtils.DEPLOY_CUSTOM_NULL) ||
param_deployLoc.equals(ServerParameterUtils.DEPLOY_CUSTOM_ABS) ||
param_deployLoc.equals(ServerParameterUtils.DEPLOY_CUSTOM_REL)) {
- ds.setDeployLocationType(IDeployableServer.DEPLOY_SERVER);
+ ds.setDeployLocationType(IDeployableServer.DEPLOY_CUSTOM);
}
if( param_deployLoc.equals(ServerParameterUtils.DEPLOY_CUSTOM_ABS)) {
String f = getCustomAbsoluteFolder();
@@ -253,6 +253,7 @@
if( MockPublishMethod4.getError() != null ) {
Throwable t = MockPublishMethod4.getError();
System.out.println(" " + t.getMessage());
+ t.printStackTrace();
fail("Error when publishing: " + t.getMessage());
}
}
@@ -260,7 +261,8 @@
IPath[] changed2 = MockPublishMethod4.getChanged();
IPath[] removed2 = MockPublishMethod4.getRemoved();
IPath[] temp2 = MockPublishMethod4.getTempPaths();
- System.out.println(" " + changed2.length + ", " + removed2.length + ", " + temp2.length);
+ String t = " " + changed2.length + ", " + removed2.length + ", " + temp2.length;
+// System.out.println(t);
assertEquals(changed2.length, changed);
assertEquals(removed2.length, removed);
assertEquals(temp2.length, temp);
Modified: trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/publishing/SingleDeployableFolderTest.java
===================================================================
--- trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/publishing/SingleDeployableFolderTest.java 2012-09-28 08:38:43 UTC (rev 44112)
+++ trunk/as/tests/org.jboss.tools.as.test.core/src/org/jboss/tools/as/test/core/parametized/server/publishing/SingleDeployableFolderTest.java 2012-09-28 09:24:17 UTC (rev 44113)
@@ -147,7 +147,7 @@
IPath[] changed = MockPublishMethod4.getChanged();
IPath[] removed = MockPublishMethod4.getRemoved();
IPath[] temp = MockPublishMethod4.getTempPaths();
- System.out.println(" " + changed.length + ", " + removed.length + ", " + temp.length);
+ //System.out.println(" " + changed.length + ", " + removed.length + ", " + temp.length);
if( !isZipped() ) {
boolean foundRemoved = false;
for( int i = 0; i < removed.length; i++ ) {
More information about the jbosstools-commits
mailing list