From 572437d8100e38e4295f8a32a2779c69cb2f2895 Mon Sep 17 00:00:00 2001 From: acolyer Date: Wed, 2 Jun 2004 12:15:00 +0000 Subject: ensure that no test involving the checking of timestamps in directories can complete in < 1 second (File.lastModifiedTime is only accurate to the second and truncates). --- testing/src/org/aspectj/testing/harness/bridge/DirChanges.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'testing/src') diff --git a/testing/src/org/aspectj/testing/harness/bridge/DirChanges.java b/testing/src/org/aspectj/testing/harness/bridge/DirChanges.java index d1e793289..c138d4559 100644 --- a/testing/src/org/aspectj/testing/harness/bridge/DirChanges.java +++ b/testing/src/org/aspectj/testing/harness/bridge/DirChanges.java @@ -116,6 +116,12 @@ public class DirChanges { result &= exists("at start, expected updated file to exist", EXISTS, spec.updated, doCompare); result &= exists("at start, expected removed file to exist", EXISTS, spec.removed, doCompare); startTime = System.currentTimeMillis(); + // ensure tests don't complete in < 1 second, otherwise can confuse fast machines. + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + e.printStackTrace(); + } this.handler = oldHandler; return result; } -- cgit v1.2.3