summaryrefslogtreecommitdiffstats
path: root/testing/src/org
diff options
context:
space:
mode:
authorwisberg <wisberg>2004-06-10 16:35:55 +0000
committerwisberg <wisberg>2004-06-10 16:35:55 +0000
commit2489444ba5813cb1f3409eab9d04aa73f1bb3939 (patch)
tree6282aeeaabb045426fefa84be399b898ab7c8e12 /testing/src/org
parent0ffb7cb8f5b01873495f1d419e4f59c13816325c (diff)
downloadaspectj-2489444ba5813cb1f3409eab9d04aa73f1bb3939.tar.gz
aspectj-2489444ba5813cb1f3409eab9d04aa73f1bb3939.zip
harness support for dirchanges delay (milliseconds) attribute
Diffstat (limited to 'testing/src/org')
-rw-r--r--testing/src/org/aspectj/testing/harness/bridge/DirChanges.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/testing/src/org/aspectj/testing/harness/bridge/DirChanges.java b/testing/src/org/aspectj/testing/harness/bridge/DirChanges.java
index c138d4559..fc55cfde4 100644
--- a/testing/src/org/aspectj/testing/harness/bridge/DirChanges.java
+++ b/testing/src/org/aspectj/testing/harness/bridge/DirChanges.java
@@ -139,7 +139,7 @@ public class DirChanges {
if (0l == startTime) {
throw new IllegalStateException("called before start");
}
- final long targetTime = startTime + DELAY;
+ final long targetTime = startTime + spec.delayInMilliseconds;
do {
long curTime = System.currentTimeMillis();
if (curTime >= targetTime) {
@@ -463,6 +463,8 @@ public class DirChanges {
/** relative path of dir with expected files for comparison */
String expDir;
+ long delayInMilliseconds = DELAY;
+
/** if true, fail on first mis-match */
boolean fastFail;
@@ -504,6 +506,16 @@ public class DirChanges {
expDir = expectedDirRelativePath;
}
+ public void setDelay(String delay) {
+ if (null != delay) {
+ // let NumberFormatException propogate up
+ delayInMilliseconds = Long.parseLong(delay);
+ if (delayInMilliseconds < 0l) {
+ delayInMilliseconds = 0l;
+ }
+ }
+ }
+
/**
* @param clipSuffix the String suffix, if any, to clip automatically
*/