Return-Path: X-Original-To: apmail-chemistry-commits-archive@www.apache.org Delivered-To: apmail-chemistry-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5637710FB3 for ; Sat, 29 Mar 2014 17:19:09 +0000 (UTC) Received: (qmail 97450 invoked by uid 500); 29 Mar 2014 17:19:08 -0000 Delivered-To: apmail-chemistry-commits-archive@chemistry.apache.org Received: (qmail 97400 invoked by uid 500); 29 Mar 2014 17:19:07 -0000 Mailing-List: contact commits-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list commits@chemistry.apache.org Received: (qmail 97387 invoked by uid 99); 29 Mar 2014 17:19:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Mar 2014 17:19:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Mar 2014 17:18:57 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 39053238889B; Sat, 29 Mar 2014 17:18:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1583030 - /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/test/java/org/apache/chemistry/opencmis/server/impl/AtomEntryParserTest.java Date: Sat, 29 Mar 2014 17:18:37 -0000 To: commits@chemistry.apache.org From: fmui@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140329171837.39053238889B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: fmui Date: Sat Mar 29 17:18:36 2014 New Revision: 1583030 URL: http://svn.apache.org/r1583030 Log: close streams in unit test to remove temp files Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/test/java/org/apache/chemistry/opencmis/server/impl/AtomEntryParserTest.java Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/test/java/org/apache/chemistry/opencmis/server/impl/AtomEntryParserTest.java URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/test/java/org/apache/chemistry/opencmis/server/impl/AtomEntryParserTest.java?rev=1583030&r1=1583029&r2=1583030&view=diff ============================================================================== --- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/test/java/org/apache/chemistry/opencmis/server/impl/AtomEntryParserTest.java (original) +++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/test/java/org/apache/chemistry/opencmis/server/impl/AtomEntryParserTest.java Sat Mar 29 17:18:36 2014 @@ -224,8 +224,9 @@ public class AtomEntryParserTest { + "some.file"); int contenSize = 50 * 1024 * 1024; + int base64Size = 4 * (contenSize + 2 - ((contenSize + 2) % 3)) / 3; - byte[] entry = new byte[begin.length + contenSize + end.length]; + byte[] entry = new byte[begin.length + base64Size + end.length]; System.arraycopy(begin, 0, entry, 0, begin.length); System.arraycopy(end, 0, entry, entry.length - end.length, end.length); @@ -238,6 +239,8 @@ public class AtomEntryParserTest { assertNotNull(contentStream); assertNotNull(contentStream.getStream()); + + contentStream.getStream().close(); } private static byte[] parse(byte[] entry) throws Exception { @@ -253,6 +256,8 @@ public class AtomEntryParserTest { IOUtils.copy(contentStream.getStream(), baos); + contentStream.getStream().close(); + return baos.toByteArray(); } }