You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2016/01/21 16:10:27 UTC

svn commit: r1725978 - /commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java

Author: sebb
Date: Thu Jan 21 15:10:27 2016
New Revision: 1725978

URL: http://svn.apache.org/viewvc?rev=1725978&view=rev
Log:
More info on failure

Modified:
    commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java

Modified: commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java?rev=1725978&r1=1725977&r2=1725978&view=diff
==============================================================================
--- commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java (original)
+++ commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampParserImplTest.java Thu Jan 21 15:10:27 2016
@@ -292,7 +292,7 @@ public class FTPTimestampParserImplTest
             throws ParseException {
         FTPTimestampParserImpl parser = new FTPTimestampParserImpl();
         parser.setLenientFutureDates(lenient);
-        Format shortFormat = parser.getRecentDateFormat(); // It's expecting this format
+        SimpleDateFormat shortFormat = parser.getRecentDateFormat(); // It's expecting this format
 
         final String shortDate = shortFormat.format(input.getTime());
         Calendar output=parser.parseTimestamp(shortDate, servertime);
@@ -305,7 +305,8 @@ public class FTPTimestampParserImplTest
         if (indom != outdom || inmon != outmon || inyear != outyear){
             Format longFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm");
             fail("Test: '"+msg+"' Server="+longFormat.format(servertime.getTime())
-                    +". Failed to parse "+shortDate
+                    +". Failed to parse "+shortDate + (lenient ? " (lenient)" : " (non-lenient)")
+                    +" using " + shortFormat.toPattern()
                     +". Actual "+longFormat.format(output.getTime())
                     +". Expected "+longFormat.format(expected.getTime()));
         }