harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r438021 - /incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java
Date Tue, 29 Aug 2006 09:04:26 GMT
Author: pyang
Date: Tue Aug 29 02:04:25 2006
New Revision: 438021

URL: http://svn.apache.org/viewvc?rev=438021&view=rev
Log:
Patch applied for HARMONY-1294 ([classlib][logging] FileHandlerTest doesn't delete test-generated
files automatically when test exits.)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java?rev=438021&r1=438020&r2=438021&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java
Tue Aug 29 02:04:25 2006
@@ -330,8 +330,17 @@
 		assertFileContent(TEMPPATH, "testLimitCount0.0",
 				new LogRecord[] { rs[9] }, handler.getFormatter());
 		
-		assertNotNull(new FileHandler("a", 0, 1));
-		assertNotNull(new FileHandler("a", 0, 1, false));
+        try {
+            File logDir = new File("log");
+            reset("log",""); 
+            logDir.mkdir();
+            FileHandler h1 = new FileHandler("log/a", 0, 1);
+            assertNotNull(h1);
+            FileHandler h2 = new FileHandler("log/a", 0, 1, false);
+            assertNotNull(h2);
+        } finally {
+            reset("log", "");
+        }	
 	}
 
 	public void testSecurity() throws IOException {



Mime
View raw message