]> source.dussan.org Git - sonarqube.git/commitdiff
[NOJIRA] Make InternalPropertiesDaoIT deterministic (#8304)
authorWojtek Wajerowicz <115081248+wojciech-wajerowicz-sonarsource@users.noreply.github.com>
Mon, 15 May 2023 08:10:02 +0000 (10:10 +0200)
committersonartech <sonartech@sonarsource.com>
Mon, 15 May 2023 20:02:39 +0000 (20:02 +0000)
server/sonar-db-dao/src/it/java/org/sonar/db/property/InternalPropertiesDaoIT.java

index e606d7443006555311fd20137e03dd9f4ba664ed..3030fbf4b4e5f6cb2bc9180751001c21fed719fb 100644 (file)
@@ -547,7 +547,7 @@ public class InternalPropertiesDaoIT {
 
   @Test
   public void tryLock_throws_IAE_if_lock_name_length_is_too_long() {
-    String tooLongName = randomAlphabetic(LOCK_NAME_MAX_LENGTH + new Random().nextInt(30));
+    String tooLongName = randomAlphabetic(LOCK_NAME_MAX_LENGTH + 1);
 
     assertThatThrownBy(() -> underTest.tryLock(dbSession, tooLongName, 60))
       .isInstanceOf(IllegalArgumentException.class)