Author: chris.laprun(a)jboss.com
Date: 2007-03-03 15:26:32 -0500 (Sat, 03 Mar 2007)
New Revision: 6507
Modified:
trunk/wsrp/build.xml
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/DeploymentTestCase.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java
trunk/wsrp/src/resources/tests/test-deployment-lib-jar/test-wsrp.xml
Log:
- Fixed NPE when restoring initial values of System properties if there was no initial
value.
- Fixed DeploymentTestCase.
Modified: trunk/wsrp/build.xml
===================================================================
--- trunk/wsrp/build.xml 2007-03-03 19:26:08 UTC (rev 6506)
+++ trunk/wsrp/build.xml 2007-03-03 20:26:32 UTC (rev 6507)
@@ -688,7 +688,7 @@
<!--<jvmarg value="-Xdebug"/>
<jvmarg value="-Xnoagent"/>
<jvmarg value="-Djava.compiler=NONE"/>
- <jvmarg
value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787"/>-->
+ <jvmarg
value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8787"/>-->
<sysproperty key="test.root"
value="${build.lib}/tests"/>
</x-sysproperty>
<x-classpath>
Modified:
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/DeploymentTestCase.java
===================================================================
---
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/DeploymentTestCase.java 2007-03-03
19:26:08 UTC (rev 6506)
+++
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/DeploymentTestCase.java 2007-03-03
20:26:32 UTC (rev 6507)
@@ -105,11 +105,11 @@
consumer = ((WSRPConsumerService)service).getConsumer();
assertEquals("inDB2", consumer.getProducerId());
assertNull(consumer.getProducerInfo().getExpirationCacheSeconds());
+ // since inDB2 is loaded from MockConsumerRegistry, it shouldn't be processed
by WSRPDeploymentFactory and should
+ // therefore return null for most values (as it's how MockWSRPConsumer is
implemented)
EndpointConfigurationInfo endpoint =
consumer.getProducerInfo().getEndpointConfigurationInfo();
- assertEquals("service-description-2",
endpoint.getServiceDescriptionURL());
- assertEquals("markup-2", endpoint.getMarkupURL());
- assertEquals("registration-2", endpoint.getRegistrationURL());
- assertEquals("portlet-management-2",
endpoint.getPortletManagementURL());
+ assertNull(endpoint.getServiceDescriptionURL());
+ assertNull(endpoint.getMarkupURL());
//
service = services.get(2);
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java
===================================================================
---
trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java 2007-03-03
19:26:08 UTC (rev 6506)
+++
trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java 2007-03-03
20:26:32 UTC (rev 6507)
@@ -216,8 +216,15 @@
finally
{
// restore time outs
- System.setProperty("sun.net.client.defaultConnectTimeout",
connectTimeOut);
- System.setProperty("sun.net.client.defaultReadTimeout",
readTimeOut);
+ if (connectTimeOut != null)
+ {
+ System.setProperty("sun.net.client.defaultConnectTimeout",
connectTimeOut);
+ }
+
+ if (readTimeOut != null)
+ {
+ System.setProperty("sun.net.client.defaultReadTimeout",
readTimeOut);
+ }
}
}
Modified: trunk/wsrp/src/resources/tests/test-deployment-lib-jar/test-wsrp.xml
===================================================================
--- trunk/wsrp/src/resources/tests/test-deployment-lib-jar/test-wsrp.xml 2007-03-03
19:26:08 UTC (rev 6506)
+++ trunk/wsrp/src/resources/tests/test-deployment-lib-jar/test-wsrp.xml 2007-03-03
20:26:32 UTC (rev 6507)
@@ -50,8 +50,6 @@
<endpoint-config>
<service-description-url>service-description-2</service-description-url>
<markup-url>markup-2</markup-url>
- <registration-url>registration-2</registration-url>
-
<portlet-management-url>portlet-management-2</portlet-management-url>
</endpoint-config>
</wsrp-producer>
</deployment>