Commented-out assertion that we do not try to touch to a time far in the future.
1.1 --- a/openide.util/test/unit/src/org/openide/util/test/TestFileUtils.java Sun Nov 22 11:34:19 2009 +0100
1.2 +++ b/openide.util/test/unit/src/org/openide/util/test/TestFileUtils.java Mon Nov 23 16:32:40 2009 -0500
1.3 @@ -157,7 +157,14 @@
1.4 if (ref != null) {
1.5 older = Math.max(older, ref.lastModified());
1.6 }
1.7 - for (long pause = 1; pause < 9999; pause *= 2) {
1.8 + int maxPause = 9999;
1.9 + /* XXX consider this (as yet untested):
1.10 + long curr = System.currentTimeMillis();
1.11 + if (older > curr + maxPause) {
1.12 + throw new IllegalArgumentException("reference too far into the future, by " + (older - curr) + "msec");
1.13 + }
1.14 + */
1.15 + for (long pause = 1; pause < maxPause; pause *= 2) {
1.16 Thread.sleep(pause);
1.17 f.setLastModified(System.currentTimeMillis() + 1); // plus 1 needed for FileObject tests (initially FO lastModified is set to currentTimeMillis)
1.18 if (f.lastModified() > older) {