Author: chris.laprun(a)jboss.com
Date: 2007-03-06 21:39:54 -0500 (Tue, 06 Mar 2007)
New Revision: 6571
Modified:
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/DeploymentTestCase.java
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/MockConsumerRegistry.java
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/MockWSRPConsumer.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/WSRPConsumer.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java
Log:
- Fixed DeploymentTestCase by having smarter mocks and adpating expectations.
- MockConsumerRegistry now implements createConsumer.
- Removed unused setServiceFactory method on WSRPConsumer.
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-07
01:14:28 UTC (rev 6570)
+++
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/DeploymentTestCase.java 2007-03-07
02:39:54 UTC (rev 6571)
@@ -106,10 +106,10 @@
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)
+ // therefore return the default value for the mandatory URLs
EndpointConfigurationInfo endpoint =
consumer.getProducerInfo().getEndpointConfigurationInfo();
- assertNull(endpoint.getServiceDescriptionURL());
- assertNull(endpoint.getMarkupURL());
+ assertEquals(EndpointConfigurationInfo.UNSET,
endpoint.getServiceDescriptionURL());
+ assertEquals(EndpointConfigurationInfo.UNSET, endpoint.getMarkupURL());
//
service = services.get(2);
Modified:
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/MockConsumerRegistry.java
===================================================================
---
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/MockConsumerRegistry.java 2007-03-07
01:14:28 UTC (rev 6570)
+++
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/MockConsumerRegistry.java 2007-03-07
02:39:54 UTC (rev 6571)
@@ -71,7 +71,9 @@
public WSRPConsumer createConsumer(String id)
{
- throw new UnsupportedOperationException("createConsumer is not supported on
MockConsumerRegistry");
+ MockWSRPConsumer consumer = new MockWSRPConsumer(id);
+ consumers.put(id, consumer);
+ return consumer;
}
public void persistConsumer(WSRPConsumer consumer)
Modified:
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/MockWSRPConsumer.java
===================================================================
---
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/MockWSRPConsumer.java 2007-03-07
01:14:28 UTC (rev 6570)
+++
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/framework/support/MockWSRPConsumer.java 2007-03-07
02:39:54 UTC (rev 6571)
@@ -59,13 +59,9 @@
return producerInfo.getId();
}
- public void setServiceFactory(ServiceFactory serviceFactory)
- {
- }
-
public ServiceFactory getServiceFactory()
{
- return null;
+ return producerInfo.getEndpointConfigurationInfo().getServiceFactory();
}
public ProducerSessionInformation getProducerSessionInformationFrom(PortletInvocation
invocation)
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/WSRPConsumer.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/WSRPConsumer.java 2007-03-07 01:14:28 UTC
(rev 6570)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/WSRPConsumer.java 2007-03-07 02:39:54 UTC
(rev 6571)
@@ -48,13 +48,6 @@
String getProducerId();
/**
- * Sets the ServiceFactory this Consumer will use to access the associated
Producer's services.
- *
- * @param serviceFactory the ServiceFactory this Consumer will use to access the
associated Producer's services.
- */
- void setServiceFactory(ServiceFactory serviceFactory);
-
- /**
* Retrieves the ServiceFactory this Consumer will use to access the associated
Producer's services.
*
* @return the ServiceFactory this Consumer will use to access the associated
Producer's services.
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java 2007-03-07
01:14:28 UTC (rev 6570)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java 2007-03-07
02:39:54 UTC (rev 6571)
@@ -476,11 +476,6 @@
return producerInfo.getEndpointConfigurationInfo().getServiceFactory();
}
- public void setServiceFactory(ServiceFactory serviceFactory)
- {
- producerInfo.getEndpointConfigurationInfo().setServiceFactory(serviceFactory);
- }
-
public WSRP_v1_ServiceDescription_PortType getServiceDescriptionService() throws
PortletInvokerException
{
producerInfo.refresh(false);
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-07
01:14:28 UTC (rev 6570)
+++
trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java 2007-03-07
02:39:54 UTC (rev 6571)
@@ -207,7 +207,7 @@
thread.start();
// Wait for the thread to finish but don't wait longer than the specified
time
- long delayMillis = 1000;
+ long delayMillis = 2500;
try
{
thread.join(delayMillis);
Show replies by date