cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject svn commit: r448947 - /incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/ClientServerMtomXopTest.java
Date Fri, 22 Sep 2006 14:29:59 GMT
Author: tli
Date: Fri Sep 22 07:29:59 2006
New Revision: 448947

URL: http://svn.apache.org/viewvc?view=rev&rev=448947
Log:
CXF-74 fix the problem of using Constant for compare, to fix bug of file size changed when
upload to unix by svn

Modified:
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/ClientServerMtomXopTest.java

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/ClientServerMtomXopTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/ClientServerMtomXopTest.java?view=diff&rev=448947&r1=448946&r2=448947
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/ClientServerMtomXopTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/ClientServerMtomXopTest.java
Fri Sep 22 07:29:59 2006
@@ -72,6 +72,12 @@
         HelloService hs = new HelloService();
         Hello hello = hs.getPort(Hello.class);
         try {
+            InputStream pre = this.getClass().getResourceAsStream("/wsdl/mtom_xop.wsdl");
+            long fileSize = 0;
+            for (int i = pre.read(); i != -1; i = pre.read()) {
+                fileSize++;
+            }
+            
             ByteArrayDataSource bads = new ByteArrayDataSource(this.getClass().getResourceAsStream(
                             "/wsdl/mtom_xop.wsdl"), "application/oct-stream");
             DataHandler dh = new DataHandler(bads);
@@ -82,7 +88,7 @@
             for (int i = in.read(); i != -1; i = in.read()) {
                 count++;
             }
-            assertEquals("attachemnt length different", 5531, count);
+            assertEquals("attachemnt length different", fileSize, count);
         } catch (UndeclaredThrowableException ex) {
             throw (Exception) ex.getCause();
         }



Mime
View raw message