]> source.dussan.org Git - sonarqube.git/commitdiff
Remove useless parameter refresh 926/head
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 4 May 2016 13:22:47 +0000 (15:22 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 4 May 2016 13:49:20 +0000 (15:49 +0200)
server/sonar-server/src/main/java/org/sonar/server/component/ComponentCleanerService.java
server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndexer.java
server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexerTest.java

index 8d75008845bef018595cff25e24de6c4cb33acfb..4026a58147cf8aeee0359f56dea2d0b15355d20f 100644 (file)
 package org.sonar.server.component;
 
 import java.util.List;
+import org.sonar.api.ce.ComputeEngineSide;
 import org.sonar.api.resources.ResourceType;
 import org.sonar.api.resources.ResourceTypes;
 import org.sonar.api.resources.Scopes;
-import org.sonar.api.ce.ComputeEngineSide;
 import org.sonar.api.server.ServerSide;
 import org.sonar.db.DbClient;
 import org.sonar.db.DbSession;
@@ -83,7 +83,7 @@ public class ComponentCleanerService {
   private void deleteFromIndices(String projectUuid) {
     // optimization : index "issues" is refreshed once at the end
     issueAuthorizationIndexer.deleteProject(projectUuid, false);
-    issueIndexer.deleteProject(projectUuid, true);
+    issueIndexer.deleteProject(projectUuid);
     testIndexer.deleteByProject(projectUuid);
   }
 
index 73b68a4a43e069636f7fa1bd21c6a5fe4a17a2bd..97e747ec8a76acbd5fbbb0c0c4fcbf24a21a3c84 100644 (file)
@@ -101,9 +101,9 @@ public class IssueIndexer extends BaseIndexer {
     return maxDate;
   }
 
-  public void deleteProject(String uuid, boolean refresh) {
+  public void deleteProject(String uuid) {
     BulkIndexer bulk = new BulkIndexer(esClient, INDEX);
-    bulk.setDisableRefresh(!refresh);
+    bulk.setDisableRefresh(false);
     bulk.start();
     SearchRequestBuilder search = esClient.prepareSearch(INDEX)
       .setRouting(uuid)
index e10d2c82252d265e15f735643e894ad85864e622..81e46971b41c4255adf4f670b384cf7d24977871 100644 (file)
@@ -106,7 +106,7 @@ public class IssueIndexerTest {
 
     assertThat(esTester.countDocuments("issues", "issue")).isEqualTo(1);
 
-    indexer.deleteProject("THE_PROJECT", true);
+    indexer.deleteProject("THE_PROJECT");
 
     assertThat(esTester.countDocuments("issues", "issue")).isZero();
   }