diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-12-11 09:07:34 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-12-11 09:07:34 +0000 |
commit | e61edd75075103d0f77d29355ab7bb5028452561 (patch) | |
tree | 202f03f8ba4d5837a085fa6d98f2b9a56ee075f0 /sca-java-2.x/trunk/modules/implementation-python/src/test/java/org/apache/tuscany/sca | |
parent | f04ea4c2210d49ff12afd97725b9adf9fae37c1f (diff) |
Fix testcase to close the writer
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1044596 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/implementation-python/src/test/java/org/apache/tuscany/sca')
-rw-r--r-- | sca-java-2.x/trunk/modules/implementation-python/src/test/java/org/apache/tuscany/sca/implementation/python/ReadWriteTestCase.java | 5 |
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\"")); } } |