ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs SleepTest.java
Date Thu, 18 Oct 2001 23:53:03 GMT
stevel      01/10/18 16:53:03

  Modified:    src/testcases/org/apache/tools/ant/taskdefs SleepTest.java
  Log:
  a full second of leeway on the clock during sleep tests to address scheduling/timing issues
across different platforms.
  
  Revision  Changes    Path
  1.2       +4 -3      jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/SleepTest.java
  
  Index: SleepTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/SleepTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SleepTest.java	2001/06/21 10:19:12	1.1
  +++ SleepTest.java	2001/10/18 23:53:03	1.2
  @@ -63,7 +63,8 @@
   
       private final static String TASKDEFS_DIR = "src/etc/testcases/taskdefs/";
       private final static boolean TRACE=false;
  -
  +	private final static int ERROR_RANGE=1000;
  +	
       public SleepTest(String name) {
           super(name);
       }
  @@ -93,7 +94,7 @@
           executeTarget("test3");
           timer.stop();
           if(TRACE) System.out.println(" test3 elapsed time="+timer.time());
  -        assert(timer.time()>=2000);
  +        assert(timer.time()>=(2000-ERROR_RANGE));
       }
   
       public void test4() {
  @@ -101,7 +102,7 @@
           executeTarget("test3");
           timer.stop();
           if(TRACE) System.out.println(" test4 elapsed time="+timer.time());
  -        assert(timer.time()>=2000 && timer.time()<60000);
  +        assert(timer.time()>=(2000-ERROR_RANGE) && timer.time()<60000);
       }
   
       public void test5() {
  
  
  

Mime
View raw message