diff options
author | David Cho-Lerat <david.cho-lerat@sonarsource.com> | 2024-01-30 10:40:43 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-01-30 15:02:03 +0000 |
commit | aa685bd63b7364ce350168ef7e7b027afc0928bd (patch) | |
tree | 420369899ea3c81576457bd1a2c0d4d9cb56239b /server/sonar-webserver-core | |
parent | d38fbd9b6915692d435355dac629ad660783912c (diff) | |
download | sonarqube-aa685bd63b7364ce350168ef7e7b027afc0928bd.tar.gz sonarqube-aa685bd63b7364ce350168ef7e7b027afc0928bd.zip |
SONAR-20479 Replace "[re-]indexation" with "[re-]indexing" in user-facing messages and code comments
Diffstat (limited to 'server/sonar-webserver-core')
2 files changed, 16 insertions, 12 deletions
diff --git a/server/sonar-webserver-core/src/main/java/org/sonar/server/issue/index/AsyncIssueIndexingImpl.java b/server/sonar-webserver-core/src/main/java/org/sonar/server/issue/index/AsyncIssueIndexingImpl.java index 900324d2fd7..a4421c3b2e1 100644 --- a/server/sonar-webserver-core/src/main/java/org/sonar/server/issue/index/AsyncIssueIndexingImpl.java +++ b/server/sonar-webserver-core/src/main/java/org/sonar/server/issue/index/AsyncIssueIndexingImpl.java @@ -63,7 +63,7 @@ public class AsyncIssueIndexingImpl implements AsyncIssueIndexing { try (DbSession dbSession = dbClient.openSession(false)) { - // remove already existing indexation task, if any + // remove already existing indexing task, if any removeExistingIndexationTasks(dbSession); dbClient.branchDao().updateAllNeedIssueSync(dbSession); @@ -99,7 +99,7 @@ public class AsyncIssueIndexingImpl implements AsyncIssueIndexing { public void triggerForProject(String projectUuid) { try (DbSession dbSession = dbClient.openSession(false)) { - // remove already existing indexation task, if any + // remove already existing indexing task, if any removeExistingIndexationTasksForProject(dbSession, projectUuid); dbClient.branchDao().updateAllNeedIssueSyncForProject(dbSession, projectUuid); @@ -162,14 +162,18 @@ public class AsyncIssueIndexingImpl implements AsyncIssueIndexing { } private void removeIndexationTasks(DbSession dbSession, Set<String> ceQueueUuids, Set<String> ceActivityUuids) { - LOG.info(String.format("%s pending indexation task found to be deleted...", ceQueueUuids.size())); + LOG.atInfo().setMessage("{} pending indexing task found to be deleted...") + .addArgument(ceQueueUuids.size()) + .log(); for (String uuid : ceQueueUuids) { dbClient.ceQueueDao().deleteByUuid(dbSession, uuid); } - LOG.info(String.format("%s completed indexation task found to be deleted...", ceQueueUuids.size())); + LOG.atInfo().setMessage("{} completed indexing task found to be deleted...") + .addArgument(ceQueueUuids.size()) + .log(); dbClient.ceActivityDao().deleteByUuids(dbSession, ceActivityUuids); - LOG.info("Indexation task deletion complete."); + LOG.info("Indexing task deletion complete."); LOG.info("Deleting tasks characteristics..."); Set<String> tasksUuid = Stream.concat(ceQueueUuids.stream(), ceActivityUuids.stream()).collect(Collectors.toSet()); diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/issue/index/AsyncIssueIndexingImplTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/issue/index/AsyncIssueIndexingImplTest.java index 962f33e7cc7..2cb19cf6ffc 100644 --- a/server/sonar-webserver-core/src/test/java/org/sonar/server/issue/index/AsyncIssueIndexingImplTest.java +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/issue/index/AsyncIssueIndexingImplTest.java @@ -159,9 +159,9 @@ public class AsyncIssueIndexingImplTest { assertThat(logTester.logs(Level.INFO)) .contains( - "1 pending indexation task found to be deleted...", - "1 completed indexation task found to be deleted...", - "Indexation task deletion complete.", + "1 pending indexing task found to be deleted...", + "1 completed indexing task found to be deleted...", + "Indexing task deletion complete.", "Deleting tasks characteristics...", "Tasks characteristics deletion complete."); } @@ -197,7 +197,7 @@ public class AsyncIssueIndexingImplTest { assertThat(dbClient.ceActivityDao().selectByTaskType(dbTester.getSession(), REPORT)).hasSize(1); assertThat(dbClient.ceTaskCharacteristicsDao().selectByTaskUuids(dbTester.getSession(), new HashSet<>(List.of("uuid_2")))).isEmpty(); - // verify that the canceled tasks on anotherProject is still here, and was not removed by the project reindexation + // verify that the canceled tasks on anotherProject is still here, and was not removed by the project reindexing assertThat(dbClient.ceActivityDao().selectByTaskType(dbTester.getSession(), BRANCH_ISSUE_SYNC)) .hasSize(1) .extracting(CeActivityDto::getEntityUuid) @@ -205,9 +205,9 @@ public class AsyncIssueIndexingImplTest { assertThat(logTester.logs(Level.INFO)) .contains( - "2 pending indexation task found to be deleted...", - "2 completed indexation task found to be deleted...", - "Indexation task deletion complete.", + "2 pending indexing task found to be deleted...", + "2 completed indexing task found to be deleted...", + "Indexing task deletion complete.", "Deleting tasks characteristics...", "Tasks characteristics deletion complete.", "Tasks characteristics deletion complete.", |