servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eno...@apache.org
Subject svn commit: r782631 - in /servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src: main/java/org/apache/servicemix/http/jetty/ test/java/org/apache/servicemix/http/packaging/
Date Mon, 08 Jun 2009 14:02:36 GMT
Author: enolan
Date: Mon Jun  8 14:02:36 2009
New Revision: 782631

URL: http://svn.apache.org/viewvc?rev=782631&view=rev
Log:
SMXCOMP-528 - fix test failure.

Modified:
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/jetty/SmxHttpExchange.java
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/packaging/HttpServiceUnitAnalyzerTest.java

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/jetty/SmxHttpExchange.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/jetty/SmxHttpExchange.java?rev=782631&r1=782630&r2=782631&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/jetty/SmxHttpExchange.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/jetty/SmxHttpExchange.java
Mon Jun  8 14:02:36 2009
@@ -19,6 +19,7 @@
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.Reader;
 import java.io.UnsupportedEncodingException;
@@ -74,6 +75,14 @@
         return null;
     }
 
+     /* ------------------------------------------------------------ */
+    public InputStream getResponseStream() throws UnsupportedEncodingException {
+        if (responseContent != null) {
+            return new ByteArrayInputStream(responseContent.toByteArray());
+        }
+        return null;
+    }
+
     /* ------------------------------------------------------------ */
     public byte[] getResponseData() throws UnsupportedEncodingException {
         if (responseContent != null) {

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/packaging/HttpServiceUnitAnalyzerTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/packaging/HttpServiceUnitAnalyzerTest.java?rev=782631&r1=782630&r2=782631&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/packaging/HttpServiceUnitAnalyzerTest.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-http/src/test/java/org/apache/servicemix/http/packaging/HttpServiceUnitAnalyzerTest.java
Mon Jun  8 14:02:36 2009
@@ -99,10 +99,10 @@
 
     // Dummy Endpoint implementation for testing.
     public static class TestEndpoint extends Endpoint {
-        //private String key;
+        private String key;
 
         public TestEndpoint() {
-            //key = "test";
+            key = "test";
         }
         
         public TestEndpoint(ServiceUnit serviceUnit, QName service, String endpoint) {
@@ -110,7 +110,7 @@
         }
 
         public String getKey() { 
-            return super.getKey();
+            return key;
         }
 
         public void activate() throws Exception {
@@ -130,7 +130,7 @@
         public boolean isExchangeOkay(MessageExchange exchange) {
             return false;
         }
-
+        
     }
 
     protected class MyComponent extends DefaultComponent {



Mime
View raw message