diff options
author | Aurelien Poscia <aurelien.poscia@sonarsource.com> | 2023-05-11 16:25:27 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-05-11 20:03:15 +0000 |
commit | c5a49895107750a74f6e0eff57f11ecccaca8bba (patch) | |
tree | 0e63e1c48a035eb4a867ba3be3090f7c75068f60 | |
parent | db71ccc5a663b7a7e541aa21ad34771420e671a5 (diff) | |
download | sonarqube-c5a49895107750a74f6e0eff57f11ecccaca8bba.tar.gz sonarqube-c5a49895107750a74f6e0eff57f11ecccaca8bba.zip |
NO-JIRA fix code smell
-rw-r--r-- | server/sonar-ce-common/src/it/java/org/sonar/ce/queue/CeQueueImplIT.java | 2 | ||||
-rw-r--r-- | server/sonar-db-dao/src/it/java/org/sonar/db/property/InternalPropertiesDaoIT.java | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/server/sonar-ce-common/src/it/java/org/sonar/ce/queue/CeQueueImplIT.java b/server/sonar-ce-common/src/it/java/org/sonar/ce/queue/CeQueueImplIT.java index d89b20a568b..12195d1aac8 100644 --- a/server/sonar-ce-common/src/it/java/org/sonar/ce/queue/CeQueueImplIT.java +++ b/server/sonar-ce-common/src/it/java/org/sonar/ce/queue/CeQueueImplIT.java @@ -315,7 +315,7 @@ public class CeQueueImplIT { public void massSubmit_with_UNIQUE_QUEUE_PER_MAIN_COMPONENT_does_not_create_task_when_there_is_many_pending_task_for_same_main_component() { String mainComponentUuid = randomAlphabetic(5); CeTaskSubmit taskSubmit = createTaskSubmit("with_component", newComponent(mainComponentUuid), null); - String[] uuids = IntStream.range(0, 2 + new Random().nextInt(5)) + String[] uuids = IntStream.range(0, 7) .mapToObj(i -> insertPendingInQueue(newComponent(mainComponentUuid))) .map(CeQueueDto::getUuid) .toArray(String[]::new); diff --git a/server/sonar-db-dao/src/it/java/org/sonar/db/property/InternalPropertiesDaoIT.java b/server/sonar-db-dao/src/it/java/org/sonar/db/property/InternalPropertiesDaoIT.java index 4e0876e1e3c..e606d744300 100644 --- a/server/sonar-db-dao/src/it/java/org/sonar/db/property/InternalPropertiesDaoIT.java +++ b/server/sonar-db-dao/src/it/java/org/sonar/db/property/InternalPropertiesDaoIT.java @@ -369,11 +369,10 @@ public class InternalPropertiesDaoIT { @Test public void selectByKeys_throws_IAE_when_keys_contains_null() { - Random random = new Random(); Set<String> keysIncludingANull = Stream.of( - IntStream.range(0, random.nextInt(10)).mapToObj(i -> "b_" + i), + IntStream.range(0, 10).mapToObj(i -> "b_" + i), Stream.of((String) null), - IntStream.range(0, random.nextInt(10)).mapToObj(i -> "a_" + i)) + IntStream.range(0, 10).mapToObj(i -> "a_" + i)) .flatMap(s -> s) .collect(Collectors.toSet()); |