Search in sources :

Example 26 with IndexingResult

use of org.sonar.server.es.IndexingResult in project sonarqube by SonarSource.

the class ProjectMeasuresIndexerTest method update_index_when_project_key_is_updated.

@Test
public void update_index_when_project_key_is_updated() {
    ComponentDto project = db.components().insertPrivateProject();
    IndexingResult result = indexProject(project, PROJECT_KEY_UPDATE);
    assertThatIndexContainsOnly(project);
    assertThat(result.getTotal()).isOne();
    assertThat(result.getSuccess()).isOne();
}
Also used : IndexingResult(org.sonar.server.es.IndexingResult) ComponentDto(org.sonar.db.component.ComponentDto) Test(org.junit.Test)

Aggregations

IndexingResult (org.sonar.server.es.IndexingResult)26 Test (org.junit.Test)15 ComponentDto (org.sonar.db.component.ComponentDto)11 BulkIndexer (org.sonar.server.es.BulkIndexer)8 OneToOneResilientIndexingListener (org.sonar.server.es.OneToOneResilientIndexingListener)6 EsQueueDto (org.sonar.db.es.EsQueueDto)5 IssueDto (org.sonar.db.issue.IssueDto)5 OneToManyResilientIndexingListener (org.sonar.server.es.OneToManyResilientIndexingListener)3 HashMap (java.util.HashMap)2 Map (java.util.Map)2 RuleDefinitionDto (org.sonar.db.rule.RuleDefinitionDto)2 IndexingListener (org.sonar.server.es.IndexingListener)2 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 ImmutableSet (com.google.common.collect.ImmutableSet)1 Arrays (java.util.Arrays)1 Collection (java.util.Collection)1 Collections.emptyList (java.util.Collections.emptyList)1 HashSet (java.util.HashSet)1 List (java.util.List)1 Objects (java.util.Objects)1