Author: alessio.soldano(a)jboss.com
Date: 2012-04-16 04:18:41 -0400 (Mon, 16 Apr 2012)
New Revision: 16163
Modified:
container/jboss71/branches/jbossws-jboss710/src/main/java/org/jboss/as/webservices/tests/RemoteDeployer.java
container/jboss71/branches/jbossws-jboss711/src/main/java/org/jboss/as/webservices/tests/RemoteDeployer.java
Log:
[JBWS-3482] Prevent RemoteDeployer from messing up tests result by failing to undeploy
archives which previously failed to deploy
Modified:
container/jboss71/branches/jbossws-jboss710/src/main/java/org/jboss/as/webservices/tests/RemoteDeployer.java
===================================================================
---
container/jboss71/branches/jbossws-jboss710/src/main/java/org/jboss/as/webservices/tests/RemoteDeployer.java 2012-04-16
08:16:12 UTC (rev 16162)
+++
container/jboss71/branches/jbossws-jboss710/src/main/java/org/jboss/as/webservices/tests/RemoteDeployer.java 2012-04-16
08:18:41 UTC (rev 16163)
@@ -123,12 +123,17 @@
public void undeploy(final URL archiveURL) throws Exception {
synchronized (archiveCounters) {
String k = archiveURL.toString();
- int count = archiveCounters.get(k);
- if (count > 1) {
- archiveCounters.put(k, (count - 1));
+ if (archiveCounters.containsKey(k)) {
+ int count = archiveCounters.get(k);
+ if (count > 1) {
+ archiveCounters.put(k, (count - 1));
+ return;
+ } else {
+ archiveCounters.remove(k);
+ }
+ } else {
+ LOGGER.warn("Trying to undeploy archive " + archiveURL + "
which is not currently deployed!");
return;
- } else {
- archiveCounters.remove(k);
}
final DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
Modified:
container/jboss71/branches/jbossws-jboss711/src/main/java/org/jboss/as/webservices/tests/RemoteDeployer.java
===================================================================
---
container/jboss71/branches/jbossws-jboss711/src/main/java/org/jboss/as/webservices/tests/RemoteDeployer.java 2012-04-16
08:16:12 UTC (rev 16162)
+++
container/jboss71/branches/jbossws-jboss711/src/main/java/org/jboss/as/webservices/tests/RemoteDeployer.java 2012-04-16
08:18:41 UTC (rev 16163)
@@ -137,12 +137,17 @@
public void undeploy(final URL archiveURL) throws Exception {
synchronized (archiveCounters) {
String k = archiveURL.toString();
- int count = archiveCounters.get(k);
- if (count > 1) {
- archiveCounters.put(k, (count - 1));
+ if (archiveCounters.containsKey(k)) {
+ int count = archiveCounters.get(k);
+ if (count > 1) {
+ archiveCounters.put(k, (count - 1));
+ return;
+ } else {
+ archiveCounters.remove(k);
+ }
+ } else {
+ LOGGER.warn("Trying to undeploy archive " + archiveURL + "
which is not currently deployed!");
return;
- } else {
- archiveCounters.remove(k);
}
final DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
Show replies by date