ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/image ImageTest.java
Date Wed, 25 Jun 2003 08:59:39 GMT
antoine     2003/06/25 01:59:39

  Modified:    src/testcases/org/apache/tools/ant/taskdefs/optional/image
                        ImageTest.java
  Log:
  Fix ImageTest for Windows environments.
  The test was failing due to non respect of the date/time granularity of the
  filesystem.
  
  Revision  Changes    Path
  1.3       +7 -0      ant/src/testcases/org/apache/tools/ant/taskdefs/optional/image/ImageTest.java
  
  Index: ImageTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/image/ImageTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ImageTest.java	10 Feb 2003 14:14:53 -0000	1.2
  +++ ImageTest.java	25 Jun 2003 08:59:39 -0000	1.3
  @@ -55,6 +55,7 @@
   package org.apache.tools.ant.taskdefs.optional.image;
   
   import org.apache.tools.ant.BuildFileTest;
  +import org.apache.tools.ant.taskdefs.condition.Os;
   
   import java.io.IOException;
   import java.io.File;
  @@ -107,6 +108,12 @@
         expectLogContaining("testSimpleScale", "Processing File");
         File f = createRelativeFile( "/dest/" + LARGEIMAGE  );
         long lastModified = f.lastModified();
  +       if (Os.isFamily("dos")) {
  +           try {
  +            Thread.sleep(2000);
  +           }
  +           catch (InterruptedException e) {}
  +       }
         expectLogContaining("testOverwriteTrue", "Processing File");
         f = createRelativeFile( "/dest/" + LARGEIMAGE  );
         long overwrittenLastModified = f.lastModified();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message