From: Dejan Milisavljevic Date: Tue, 27 Feb 2024 15:17:46 +0000 (+0100) Subject: SONAR-21738 Fix issues blocking Quality Gate X-Git-Tag: 10.5.0.89998~163 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=11f875035fa31bc81a55bebffa13f18653425981;p=sonarqube.git SONAR-21738 Fix issues blocking Quality Gate --- diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadQualityProfilesStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadQualityProfilesStepTest.java index 80bb922ebab..70b74b91608 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadQualityProfilesStepTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadQualityProfilesStepTest.java @@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.sonar.db.rule.RuleTesting.XOO_X1; import static org.sonar.db.rule.RuleTesting.XOO_X2; -public class LoadQualityProfilesStepTest { +class LoadQualityProfilesStepTest { @RegisterExtension private final BatchReportReaderRule batchReportReader = new BatchReportReaderRule(); diff --git a/server/sonar-ce/src/it/java/org/sonar/ce/taskprocessor/CeWorkerImplIT.java b/server/sonar-ce/src/it/java/org/sonar/ce/taskprocessor/CeWorkerImplIT.java index 4a64711c05a..60b753a3a74 100644 --- a/server/sonar-ce/src/it/java/org/sonar/ce/taskprocessor/CeWorkerImplIT.java +++ b/server/sonar-ce/src/it/java/org/sonar/ce/taskprocessor/CeWorkerImplIT.java @@ -111,14 +111,14 @@ class CeWorkerImplIT { @Test void constructor_throws_IAE_if_ordinal_is_less_than_zero() { - assertThatThrownBy(() -> new CeWorkerImpl(-1 - new Random().nextInt(20), workerUuid, queue, taskProcessorRepository, ceWorkerController)) + assertThatThrownBy(() -> new CeWorkerImpl(-1, workerUuid, queue, taskProcessorRepository, ceWorkerController)) .isInstanceOf(IllegalArgumentException.class) .hasMessage("Ordinal must be >= 0"); } @Test void getUUID_must_return_the_uuid_of_constructor() { - String uuid = UUID.randomUUID().toString(); + String uuid = "de338f4f-a06f-474f-8ad0-9941b7455904"; CeWorker underTest = new CeWorkerImpl(ordinal, uuid, queue, taskProcessorRepository, ceWorkerController); assertThat(underTest.getUUID()).isEqualTo(uuid); }