Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 75157 invoked from network); 24 Feb 2006 22:36:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Feb 2006 22:36:29 -0000 Received: (qmail 95073 invoked by uid 500); 24 Feb 2006 22:36:28 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 95028 invoked by uid 500); 24 Feb 2006 22:36:28 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 95016 invoked by uid 99); 24 Feb 2006 22:36:27 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2006 14:36:27 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 24 Feb 2006 14:36:26 -0800 Received: (qmail 74605 invoked by uid 65534); 24 Feb 2006 22:36:06 -0000 Message-ID: <20060224223606.74604.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r380839 - in /incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests: java/nio/channels/ java/nio/channels/AllTests.java java/nio/channels/FileChannelTest.java nio/AllTests.java Date: Fri, 24 Feb 2006 22:36:05 -0000 To: harmony-commits@incubator.apache.org From: tellison@apache.org X-Mailer: svnmailer-1.0.7 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: tellison Date: Fri Feb 24 14:36:05 2006 New Revision: 380839 URL: http://svn.apache.org/viewcvs?rev=380839&view=rev Log: Regression for HARMONY-40 (FileChannel assotiated with FileOutputStream not closed after closing output stream) Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/AllTests.java incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/FileChannelTest.java Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/nio/AllTests.java Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/AllTests.java URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/AllTests.java?rev=380839&view=auto ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/AllTests.java (added) +++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/AllTests.java Fri Feb 24 14:36:05 2006 @@ -0,0 +1,32 @@ +/* Copyright 2006 The Apache Software Foundation or its licensors, as applicable + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.harmony.tests.java.nio.channels; + +import junit.framework.Test; +import junit.framework.TestSuite; + +public class AllTests { + + public static Test suite() { + TestSuite suite = new TestSuite( + "Test for org.apache.harmony.tests.java.nio.channels"); + //$JUnit-BEGIN$ + suite.addTestSuite(FileChannelTest.class); + //$JUnit-END$ + return suite; + } + +} Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/FileChannelTest.java URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/FileChannelTest.java?rev=380839&view=auto ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/FileChannelTest.java (added) +++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/FileChannelTest.java Fri Feb 24 14:36:05 2006 @@ -0,0 +1,39 @@ +/* Copyright 2006 The Apache Software Foundation or its licensors, as applicable + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.harmony.tests.java.nio.channels; + +import java.io.File; +import java.io.FileOutputStream; +import java.nio.channels.FileChannel; + +import junit.framework.TestCase; + +public class FileChannelTest extends TestCase { + + /** + * @tests java.nio.channels.FileChannel#isOpen() + */ + public void test_close() throws Exception { + // Regression for HARMONY-40 + File logFile = File.createTempFile("out", "tmp"); + logFile.deleteOnExit(); + FileOutputStream out = new FileOutputStream(logFile, true); + FileChannel channel = out.getChannel(); + out.write(1); + out.close(); + assertFalse("Assert 0: Channel is still open", channel.isOpen()); + } +} Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/nio/AllTests.java URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/nio/AllTests.java?rev=380839&r1=380838&r2=380839&view=diff ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/nio/AllTests.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/nio/AllTests.java Fri Feb 24 14:36:05 2006 @@ -28,6 +28,7 @@ TestSuite suite = new TestSuite("Test for org.apache.harmony.tests.nio"); // $JUnit-BEGIN$ suite.addTest(org.apache.harmony.tests.java.nio.AllTests.suite()); + suite.addTest(org.apache.harmony.tests.java.nio.channels.AllTests.suite()); // $JUnit-END$ return suite; }