From 472bb6484765a2b5c6e36b2c77f84d071690a5fa Mon Sep 17 00:00:00 2001 From: =?utf8?q?L=C3=A9o=20Geoffroy?= Date: Wed, 27 Mar 2024 16:40:16 +0100 Subject: [PATCH] SONAR-21908 Replace usage of LTS to LTA --- .../platform/db/migration/version/DatabaseVersion.java | 4 ++-- .../sonar/server/platform/DatabaseServerCompatibility.java | 6 +++--- .../server/platform/DatabaseServerCompatibilityTest.java | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/DatabaseVersion.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/DatabaseVersion.java index 9d838180594..4359efb47b3 100644 --- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/DatabaseVersion.java +++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/DatabaseVersion.java @@ -27,8 +27,8 @@ public class DatabaseVersion { /** * The minimum supported version which can be upgraded. Lower - * versions must be previously upgraded to LTS version. - * Note that the value can't be less than current LTS version. + * versions must be previously upgraded to LTA version. + * Note that the value can't be less than current LTA version. */ public static final long MIN_UPGRADE_VERSION = 6_802; diff --git a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/DatabaseServerCompatibility.java b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/DatabaseServerCompatibility.java index 57549c5fc6f..63ec4321e42 100644 --- a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/DatabaseServerCompatibility.java +++ b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/DatabaseServerCompatibility.java @@ -20,10 +20,10 @@ package org.sonar.server.platform; import java.util.Optional; -import org.sonar.api.Startable; -import org.sonar.api.utils.MessageException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.sonar.api.Startable; +import org.sonar.api.utils.MessageException; import org.sonar.server.platform.db.migration.version.DatabaseVersion; import static org.sonar.server.log.ServerProcessLogging.STARTUP_LOGGER_NAME; @@ -48,7 +48,7 @@ public class DatabaseServerCompatibility implements Startable { if (status == DatabaseVersion.Status.REQUIRES_UPGRADE) { Optional currentVersion = this.version.getVersion(); if (currentVersion.isPresent() && currentVersion.get() < DatabaseVersion.MIN_UPGRADE_VERSION) { - throw MessageException.of("The version of SonarQube is too old. Please upgrade to the Long Term Support version first."); + throw MessageException.of("The version of SonarQube is too old. Please upgrade to the Long-Term Active version first."); } String msg = "The database must be manually upgraded. Please backup the database and browse /setup. " diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/DatabaseServerCompatibilityTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/DatabaseServerCompatibilityTest.java index 76a489f09c9..022bc4716ee 100644 --- a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/DatabaseServerCompatibilityTest.java +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/DatabaseServerCompatibilityTest.java @@ -49,14 +49,14 @@ public class DatabaseServerCompatibilityTest { } @Test - public void fail_if_requires_firstly_to_upgrade_to_lts() { + public void fail_if_requires_firstly_to_upgrade_to_lta() { DatabaseVersion version = mock(DatabaseVersion.class); when(version.getStatus()).thenReturn(DatabaseVersion.Status.REQUIRES_UPGRADE); when(version.getVersion()).thenReturn(Optional.of(12L)); var compatibility = new DatabaseServerCompatibility(version); assertThatThrownBy(compatibility::start) .isInstanceOf(MessageException.class) - .hasMessage("The version of SonarQube is too old. Please upgrade to the Long Term Support version first."); + .hasMessage("The version of SonarQube is too old. Please upgrade to the Long-Term Active version first."); } @Test -- 2.39.5