aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-server
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-10-15 18:22:28 +0200
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-10-16 17:11:15 +0200
commit855096b62f197edee1f32f971730343f64dd16ab (patch)
tree989de1b644ac4316c525a5df350679e83d114f99 /server/sonar-server
parent1fb6d54e82deefb1e356e1974275c8816a676a7f (diff)
downloadsonarqube-855096b62f197edee1f32f971730343f64dd16ab.tar.gz
sonarqube-855096b62f197edee1f32f971730343f64dd16ab.zip
reduce polling time of Compute Engine scheduler from 10s to 2
Diffstat (limited to 'server/sonar-server')
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/computation/taskprocessor/CeProcessingSchedulerImpl.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/computation/taskprocessor/CeProcessingSchedulerImplTest.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/taskprocessor/CeProcessingSchedulerImpl.java b/server/sonar-server/src/main/java/org/sonar/server/computation/taskprocessor/CeProcessingSchedulerImpl.java
index d9e346a7028..4737c4010dd 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/computation/taskprocessor/CeProcessingSchedulerImpl.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/computation/taskprocessor/CeProcessingSchedulerImpl.java
@@ -33,7 +33,7 @@ public class CeProcessingSchedulerImpl implements CeProcessingScheduler {
this.executorService = processingExecutorService;
this.workerRunnable = workerRunnable;
- this.delayBetweenTasks = 10;
+ this.delayBetweenTasks = 2;
this.delayForFirstStart = 0;
this.timeUnit = TimeUnit.SECONDS;
}
diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/taskprocessor/CeProcessingSchedulerImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/taskprocessor/CeProcessingSchedulerImplTest.java
index 9dfa6da2453..c94bbd4312d 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/computation/taskprocessor/CeProcessingSchedulerImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/computation/taskprocessor/CeProcessingSchedulerImplTest.java
@@ -37,7 +37,7 @@ public class CeProcessingSchedulerImplTest {
public void startScheduling_schedules_CeWorkerRunnable_at_fixed_rate_run_head_of_queue() {
underTest.startScheduling();
- verify(processingExecutorService).scheduleAtFixedRate(same(workerRunnable), eq(0L), eq(10L), eq(TimeUnit.SECONDS));
+ verify(processingExecutorService).scheduleAtFixedRate(same(workerRunnable), eq(0L), eq(2L), eq(TimeUnit.SECONDS));
verifyNoMoreInteractions(processingExecutorService);
}