summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sca-java-2.x/trunk/modules/implementation-python/src/test/java/org/apache/tuscany/sca/implementation/python/ReadWriteTestCase.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-python/src/test/java/org/apache/tuscany/sca/implementation/python/ReadWriteTestCase.java b/sca-java-2.x/trunk/modules/implementation-python/src/test/java/org/apache/tuscany/sca/implementation/python/ReadWriteTestCase.java
index 6e5a70f734..b3fd07b158 100644
--- a/sca-java-2.x/trunk/modules/implementation-python/src/test/java/org/apache/tuscany/sca/implementation/python/ReadWriteTestCase.java
+++ b/sca-java-2.x/trunk/modules/implementation-python/src/test/java/org/apache/tuscany/sca/implementation/python/ReadWriteTestCase.java
@@ -28,6 +28,7 @@ import java.io.InputStream;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.contribution.Contribution;
@@ -82,7 +83,9 @@ public class ReadWriteTestCase {
final InputStream is = getClass().getClassLoader().getResourceAsStream("domain-test.composite");
final Composite c = (Composite)xproc.read(xif.createXMLStreamReader(is), ctx);
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
- xproc.write(c, xof.createXMLStreamWriter(bos), ctx);
+ XMLStreamWriter writer = xof.createXMLStreamWriter(bos);
+ xproc.write(c, writer, ctx);
+ writer.close();
assertTrue(bos.toString().contains("script=\"server_test.py\""));
}
}