harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
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 GMT
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;
 	}



Mime
View raw message