incubator-ftpserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r564536 - /incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/clienttests/MDTMTest.java
Date Fri, 10 Aug 2007 10:14:52 GMT
Author: ngn
Date: Fri Aug 10 03:14:51 2007
New Revision: 564536

URL: http://svn.apache.org/viewvc?view=rev&rev=564536
Log:
Fixed a broken test that would break on 24 hour locales

Modified:
    incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/clienttests/MDTMTest.java

Modified: incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/clienttests/MDTMTest.java
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/clienttests/MDTMTest.java?view=diff&rev=564536&r1=564535&r2=564536
==============================================================================
--- incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/clienttests/MDTMTest.java
(original)
+++ incubator/ftpserver/trunk/core/src/test/org/apache/ftpserver/clienttests/MDTMTest.java
Fri Aug 10 03:14:51 2007
@@ -26,7 +26,7 @@
 
 
 public class MDTMTest extends ClientTestTemplate {
-    private static final SimpleDateFormat FTP_DATE_FORMAT = new SimpleDateFormat("yyyyMMddhhmmss.SSS");
+    private static final SimpleDateFormat FTP_DATE_FORMAT = new SimpleDateFormat("yyyyMMddHHmmss.SSS");
     private static final File TEST_FILE1 = new File(ROOT_DIR, "test1.txt");
     private static final File TEST_DIR1 = new File(ROOT_DIR, "dir1");
     
@@ -40,7 +40,9 @@
     }
 
     public void testMDTMForFile() throws Exception {
-        TEST_FILE1.createNewFile();
+        assertFalse(TEST_FILE1.exists());
+        assertTrue(TEST_FILE1.createNewFile());
+        
         Date expected = new Date(TEST_FILE1.lastModified());
         assertEquals(213, client.sendCommand("MDTM " + TEST_FILE1.getName()));
 
@@ -49,7 +51,9 @@
     }
 
     public void testMDTMForDir() throws Exception {
-        TEST_DIR1.mkdirs();
+        assertFalse(TEST_DIR1.exists());
+        assertTrue(TEST_DIR1.mkdirs());
+
         Date expected = new Date(TEST_DIR1.lastModified());
         assertEquals(213, client.sendCommand("MDTM " + TEST_DIR1.getName()));
         



Mime
View raw message