antoine     2004/02/08 09:38:43

  Modified:    src/testcases/org/apache/tools/ant/taskdefs JavaTest.java
                        ExecTaskTest.java
  Log:
  Give 2 seconds to these tests to succeed instead of 1
  Avoiding gump failures
  
  Revision  Changes    Path
  1.20      +2 -2      
ant/src/testcases/org/apache/tools/ant/taskdefs/JavaTest.java
  
  Index: JavaTest.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/JavaTest.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- JavaTest.java     4 Feb 2004 20:38:02 -0000       1.19
  +++ JavaTest.java     8 Feb 2004 17:38:43 -0000       1.20
  @@ -31,10 +31,10 @@
    * */
   public class JavaTest extends BuildFileTest {
   
  -    private static final int TIME_TO_WAIT = 4;
  +    private static final int TIME_TO_WAIT = 1;
       // wait 1 second extra to allow for java to start ...
       // this time was OK on a Win NT machine and on nagoya
  -    private static final int SECURITY_MARGIN = 1000;
  +    private static final int SECURITY_MARGIN = 2000;
   
       private boolean runFatalTests=false;
   
  
  
  
  1.9       +4 -3      
ant/src/testcases/org/apache/tools/ant/taskdefs/ExecTaskTest.java
  
  Index: ExecTaskTest.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/ExecTaskTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ExecTaskTest.java 4 Feb 2004 20:38:02 -0000       1.8
  +++ ExecTaskTest.java 8 Feb 2004 17:38:43 -0000       1.9
  @@ -32,10 +32,10 @@
   public class ExecTaskTest extends BuildFileTest {
       private static final String BUILD_PATH = 
"src/etc/testcases/taskdefs/exec/";
       private static final String BUILD_FILE = BUILD_PATH + "exec.xml";
  -    private final int TIME_TO_WAIT = 4;
  +    private final int TIME_TO_WAIT = 1;
       /** maximum time allowed for the build in milliseconds */
       private final int MAX_BUILD_TIME = 4000;
  -    private final int SECURITY_MARGIN = 1000; // wait 1 second extras
  +    private final int SECURITY_MARGIN = 2000; // wait 2 second extras
       // the test failed with 100 ms of margin on cvs.apache.org on August 
1st, 2003
       private File logFile;
       private MonitoredBuild myBuild = null;
  @@ -92,7 +92,8 @@
           }
           // time of the build in milli seconds
           long elapsed = myBuild.getTimeElapsed();
  -        assertTrue("we waited more than the process lasted", TIME_TO_WAIT * 
1000 > elapsed);
  +        assertTrue("we waited more than the process lasted", TIME_TO_WAIT * 
1000
  +                + SECURITY_MARGIN > elapsed);
           logFile = new File(logFile.getAbsolutePath());
           assertTrue("log file found after spawn", logFile.exists());
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to