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;
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);
}
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)
assertThat(esTester.countDocuments("issues", "issue")).isEqualTo(1);
- indexer.deleteProject("THE_PROJECT", true);
+ indexer.deleteProject("THE_PROJECT");
assertThat(esTester.countDocuments("issues", "issue")).isZero();
}