mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 13:32:24 +00:00
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:
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) {
|
||||
|
||||
Reference in new issue
Block a user