don't wake up so often when waiting for Jenkins to finish - it make take away to much time from the threads that are actually doing something

This commit is contained in:
Christoph Kutzinski committed 2011-10-30 19:29:33 +01:00
1 parent 39ba4e0cb8
commit eab5fa8939
1 file changed
+2 -2
@@ -1309,13 +1309,13 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
int streak = 0;
while (true) {
Thread.sleep(10);
Thread.sleep(100);
if (isSomethingHappening())
streak=0;
else
streak++;
if (streak>5) // the system is quiet for a while
if (streak>2) // the system is quiet for a while
return;
if (System.currentTimeMillis()-startTime > timeout) {