Author: kstam
Date: Mon Apr 22 23:12:38 2013
New Revision: 1470750

URL: http://svn.apache.org/r1470750
Log:
JUDDI-496, picking random http to avoid buildbot binding issues.

Modified:
    
juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_090_SubscriptionListenerIntegrationTest.java
    
juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerService.xml
    
juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java

Modified: 
juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_090_SubscriptionListenerIntegrationTest.java
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_090_SubscriptionListenerIntegrationTest.java?rev=1470750&r1=1470749&r2=1470750&view=diff
==============================================================================
--- 
juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_090_SubscriptionListenerIntegrationTest.java
 (original)
+++ 
juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_090_SubscriptionListenerIntegrationTest.java
 Mon Apr 22 23:12:38 2013
@@ -55,6 +55,7 @@ public class API_090_SubscriptionListene
        private static String authInfoJoe = null;
        private static SimpleSmtpServer mailServer;
        private static Integer smtpPort = 25;
+       private static Integer httpPort = 80;
 
        @AfterClass
        public static void stopManager() throws ConfigurationException {
@@ -75,7 +76,7 @@ public class API_090_SubscriptionListene
                        System.setProperty(Property.DEFAULT_JUDDI_EMAIL_PREFIX 
+ "mail.smtp.from", "[email protected]");
                        mailServer = SimpleSmtpServer.start(smtpPort);
                        //bring up the TCK HTTP SubscriptionListener
-                       endPoint = 
Endpoint.publish("http://localhost:12345/tcksubscriptionlistener";, new 
UDDISubscriptionListenerImpl());
+                       endPoint = Endpoint.publish("http://localhost:"; + 
httpPort + "/tcksubscriptionlistener", new UDDISubscriptionListenerImpl());
                        
                        logger.debug("Getting auth tokens..");
                
@@ -98,7 +99,7 @@ public class API_090_SubscriptionListene
                        //Saving the binding template that will be called by 
the server for a subscription event
                        tckBusinessService.saveJoePublisherService(authInfoJoe);
                        //Saving the HTTP Listener Service
-                       tckSubscriptionListener.saveService(authInfoJoe, 
TckSubscriptionListener.LISTENER_HTTP_SERVICE_XML, 0);
+                       tckSubscriptionListener.saveService(authInfoJoe, 
TckSubscriptionListener.LISTENER_HTTP_SERVICE_XML, httpPort);
                        //Saving the HTTP Subscription
                        
tckSubscriptionListener.saveNotifierSubscription(authInfoJoe, 
TckSubscriptionListener.SUBSCRIPTION_XML);
             //Changing the service we subscribed to "JoePublisherService"
@@ -194,7 +195,7 @@ public class API_090_SubscriptionListene
                        tckBusiness.saveJoePublisherBusiness(authInfoJoe);
                        tckBusinessService.saveJoePublisherService(authInfoJoe);
                        //Saving the Listener Service
-                       tckSubscriptionListener.saveService(authInfoJoe, 
TckSubscriptionListener.LISTENER_HTTP_SERVICE_XML, 0);
+                       tckSubscriptionListener.saveService(authInfoJoe, 
TckSubscriptionListener.LISTENER_HTTP_SERVICE_XML, httpPort);
                        //Saving the Subscription
                        
tckSubscriptionListener.saveNotifierSubscription(authInfoJoe, 
TckSubscriptionListener.SUBSCRIPTION_XML);
             //Changing the service we subscribed to "JoePublisherService"

Modified: 
juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerService.xml
URL: 
http://svn.apache.org/viewvc/juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerService.xml?rev=1470750&r1=1470749&r2=1470750&view=diff
==============================================================================
--- 
juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerService.xml
 (original)
+++ 
juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerService.xml
 Mon Apr 22 23:12:38 2013
@@ -24,7 +24,7 @@
   <bindingTemplates>
        <bindingTemplate xmlns="urn:uddi-org:api_v3" 
bindingKey="uddi:uddi.joepublisher.com:bindinglistener">
          <description xml:lang="en">This is the endpoint for the subscription 
listener</description>
-         <accessPoint 
useType="endPoint">http://localhost:12345/tcksubscriptionlistener</accessPoint>
+         <accessPoint 
useType="endPoint">http://localhost:{randomPort}/tcksubscriptionlistener</accessPoint>
          <tModelInstanceDetails>
                <tModelInstanceInfo tModelKey="uddi:uddi.org:transport:http" />
          </tModelInstanceDetails>

Modified: 
juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java
URL: 
http://svn.apache.org/viewvc/juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java?rev=1470750&r1=1470749&r2=1470750&view=diff
==============================================================================
--- 
juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java
 (original)
+++ 
juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java
 Mon Apr 22 23:12:38 2013
@@ -58,6 +58,7 @@ public class UDDI_090_SubscriptionListen
        private static UDDIClerkManager manager;
        private static SimpleSmtpServer mailServer;
        private static Integer smtpPort = 25;
+       private static Integer httpPort = 80;
 
        @AfterClass
        public static void stopManager() throws ConfigurationException {
@@ -71,6 +72,7 @@ public class UDDI_090_SubscriptionListen
        public static void startManager() throws ConfigurationException {
                try {
                        smtpPort = 9700 + new Random().nextInt(99);
+                       httpPort = 9600 + new Random().nextInt(99);
                        Properties properties = new Properties();
                        properties.setProperty("juddi.mail.smtp.host", 
"localhost");
                        properties.setProperty("juddi.mail.smtp.port", 
String.valueOf(smtpPort));
@@ -89,7 +91,7 @@ public class UDDI_090_SubscriptionListen
                        properties.store(new FileOutputStream(tmpFile), "tmp 
email settings");
                        
                        //bring up the TCK SubscriptionListener
-                       endPoint = 
Endpoint.publish("http://localhost:12345/tcksubscriptionlistener";, new 
UDDISubscriptionListenerImpl());
+                       endPoint = Endpoint.publish("http://localhost:"; + 
httpPort + "/tcksubscriptionlistener", new UDDISubscriptionListenerImpl());
                        
                        manager  = new UDDIClerkManager();
                        manager.start();
@@ -125,7 +127,7 @@ public class UDDI_090_SubscriptionListen
                        //Saving the binding template that will be called by 
the server for a subscription event
                        tckBusinessService.saveJoePublisherService(authInfoJoe);
                        //Saving the HTTP Listener Service
-                       tckSubscriptionListener.saveService(authInfoJoe, 
TckSubscriptionListener.LISTENER_HTTP_SERVICE_XML, 0);
+                       tckSubscriptionListener.saveService(authInfoJoe, 
TckSubscriptionListener.LISTENER_HTTP_SERVICE_XML, httpPort);
                        //Saving the HTTP Subscription
                        
tckSubscriptionListener.saveNotifierSubscription(authInfoJoe, 
TckSubscriptionListener.SUBSCRIPTION_XML);
             //Changing the service we subscribed to "JoePublisherService"
@@ -195,8 +197,8 @@ public class UDDI_090_SubscriptionListen
                        @SuppressWarnings("rawtypes")
                        Iterator emailIter = mailServer.getReceivedEmail();
                        SmtpMessage email = (SmtpMessage)emailIter.next();
-                       System.out.println(email.getHeaderValue("Subject"));
-                       System.out.println(email.getBody());
+                       System.out.println("Subject:" + 
email.getHeaderValue("Subject"));
+                       System.out.println("Body:" + email.getBody());
                        if (!email.getBody().contains("<name 
xml:lang=\"en\">Service One</name>")) {
                                Assert.fail("Notification does not contain the 
correct service");
                        }
@@ -223,7 +225,7 @@ public class UDDI_090_SubscriptionListen
                        tckBusiness.saveJoePublisherBusiness(authInfoJoe);
                        tckBusinessService.saveJoePublisherService(authInfoJoe);
                        //Saving the Listener Service
-                       tckSubscriptionListener.saveService(authInfoJoe, 
TckSubscriptionListener.LISTENER_HTTP_SERVICE_XML, 0);
+                       tckSubscriptionListener.saveService(authInfoJoe, 
TckSubscriptionListener.LISTENER_HTTP_SERVICE_XML, httpPort);
                        //Saving the Subscription
                        
tckSubscriptionListener.saveNotifierSubscription(authInfoJoe, 
TckSubscriptionListener.SUBSCRIPTION_XML);
             //Changing the service we subscribed to "JoePublisherService"



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to