You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2006/08/22 17:08:44 UTC

svn commit: r433662 - /incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/jbi/installation/AbstractManagementTest.java

Author: gnodet
Date: Tue Aug 22 08:08:43 2006
New Revision: 433662

URL: http://svn.apache.org/viewvc?rev=433662&view=rev
Log:
Fix some junit test broken when upgrading to woodstox 3.0.0

Modified:
    incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/jbi/installation/AbstractManagementTest.java

Modified: incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/jbi/installation/AbstractManagementTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/jbi/installation/AbstractManagementTest.java?rev=433662&r1=433661&r2=433662&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/jbi/installation/AbstractManagementTest.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/jbi/installation/AbstractManagementTest.java Tue Aug 22 08:08:43 2006
@@ -2,6 +2,7 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
+import java.io.FilterOutputStream;
 import java.io.InputStream;
 import java.util.jar.JarOutputStream;
 import java.util.jar.Manifest;
@@ -102,7 +103,7 @@
                                             new String[] { suName }, 
                                             new String[] { compName }); 
     }
-
+    
     protected File createServiceAssemblyArchive(String saName, String[] suName, String[] compName) throws Exception {
         File jar = File.createTempFile("jbi", ".zip");
         JarOutputStream jos = new JarOutputStream(new FileOutputStream(jar));
@@ -110,7 +111,9 @@
         jos.putNextEntry(new ZipEntry("META-INF/jbi.xml"));
         XMLOutputFactory xof = XMLOutputFactory.newInstance();
         //xof.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.TRUE);
-        XMLStreamWriter xsw = xof.createXMLStreamWriter(jos);
+        XMLStreamWriter xsw = xof.createXMLStreamWriter(new FilterOutputStream(jos) {
+            public void close() {}
+        });
         xsw.writeStartDocument();
         xsw.writeStartElement("jbi");
         xsw.writeAttribute("xmlns", "http://java.sun.com/xml/ns/jbi");