Author: ivol37 at gmail.com
Date: Mon Nov 29 09:39:23 2010
New Revision: 451

Log:
[AMDATU-189] Added debug statement to print portnr on which integration test is 
executed

Modified:
   
trunk/integration-tests/src/test/java/org/amdatu/test/integration/tests/HttpServiceTest.java

Modified: 
trunk/integration-tests/src/test/java/org/amdatu/test/integration/tests/HttpServiceTest.java
==============================================================================
--- 
trunk/integration-tests/src/test/java/org/amdatu/test/integration/tests/HttpServiceTest.java
        (original)
+++ 
trunk/integration-tests/src/test/java/org/amdatu/test/integration/tests/HttpServiceTest.java
        Mon Nov 29 09:39:23 2010
@@ -85,7 +85,7 @@
             felixHttpServiceJetty(),
             felixHttpServiceWhiteboard(),
             slingCommons(),
-            slingMime(),            
+            slingMime(),
             commonsHttpClient(),
             paxSwissbox(),
             ops4jBaseLang(),
@@ -133,10 +133,10 @@
     public void tearDown() throws Exception {
         m_httpContextComponent.stop();
     }
-    
+
     private void initialize() throws Exception {
        m_baseUrl = "http://localhost:"; + getHttpPortNr();
-       
+
        // Initialize the HTTP Context in which the filter, servlet and JSP 
under test are registered
         m_httpContextComponent = 
m_httpContextFactoryService.create(m_bundleContext, m_testServlet);
     }
@@ -144,11 +144,11 @@
     @Test
     public void testFilter() throws Exception {
        initialize();
-       
+
        // Wait for two seconds such that the Felix whiteboard service has the 
time to receive the filter added
        // callback and register it. See 
http://jira.amdatu.org/jira/browse/AMDATU-189
        Thread.sleep(2000);
-        
+
         // Our filter should be registered, use httpclient to do a GET 
request. The filter should
         // set some response header and we check if this header has been set
         HttpClient httpClient = new HttpClient();
@@ -187,11 +187,11 @@
     @Test
     public void testJsp() throws Exception {
        initialize();
-       
+
        // Wait for two seconds such that the Felix whiteboard service has the 
time to receive the filter added
        // callback and register it. See 
http://jira.amdatu.org/jira/browse/AMDATU-189
        Thread.sleep(2000);
-       
+
         // Our filter should be registered, use httpclient to do a GET 
request. The filter should
         // set some response header and we check if this header has been set
         HttpClient httpClient = new HttpClient();
@@ -223,7 +223,9 @@
             // around for a while.
             Thread.sleep(100);
         }
-        return (String) reference.getProperty("org.osgi.service.http.port");
+        String portnr = (String) 
reference.getProperty("org.osgi.service.http.port");
+        m_logService.log(LogService.LOG_DEBUG, "Integration test is executed 
against port " + portnr);
+        return portnr;
     }
 
     /**

Reply via email to