aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-ce-task-projectanalysis
diff options
context:
space:
mode:
authorJulien Camus <julien.camus@sonarsource.com>2024-12-20 10:42:05 +0100
committersonartech <sonartech@sonarsource.com>2024-12-20 20:03:10 +0000
commitafe11634f5a0c1d89a5c0ea41cd1cebf78593b75 (patch)
treeb1ed646d3f26b435feb6936624c488bdf1b3e024 /server/sonar-ce-task-projectanalysis
parent77a3f39cc788ea88e28e72caee5d36cf72bc2c95 (diff)
downloadsonarqube-afe11634f5a0c1d89a5c0ea41cd1cebf78593b75.tar.gz
sonarqube-afe11634f5a0c1d89a5c0ea41cd1cebf78593b75.zip
SONAR-24066 Replace deprecated LoggerLevel calls to SLF4J Level
Diffstat (limited to 'server/sonar-ce-task-projectanalysis')
-rw-r--r--server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ExtractReportStepIT.java6
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/metric/ReportMetricValidatorImplTest.java3
2 files changed, 3 insertions, 6 deletions
diff --git a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ExtractReportStepIT.java b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ExtractReportStepIT.java
index ce120b0ec46..3f56baf5515 100644
--- a/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ExtractReportStepIT.java
+++ b/server/sonar-ce-task-projectanalysis/src/it/java/org/sonar/ce/task/projectanalysis/step/ExtractReportStepIT.java
@@ -32,7 +32,6 @@ import org.sonar.api.testfixtures.log.LogTester;
import org.sonar.api.utils.MessageException;
import org.sonar.api.utils.System2;
import org.sonar.api.utils.ZipUtils;
-import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.ce.task.CeTask;
import org.sonar.ce.task.projectanalysis.batch.BatchReportDirectoryHolderImpl;
import org.sonar.ce.task.projectanalysis.batch.MutableBatchReportDirectoryHolder;
@@ -53,7 +52,6 @@ public class ExtractReportStepIT {
@Rule
public LogTester logTester = new LogTester();
-
@Rule
public DbTester dbTester = DbTester.create(System2.INSTANCE);
@@ -74,7 +72,7 @@ public class ExtractReportStepIT {
@Test
public void unzip_report() throws Exception {
- logTester.setLevel(LoggerLevel.DEBUG);
+ logTester.setLevel(Level.DEBUG);
File reportFile = generateReport();
try (InputStream input = FileUtils.openInputStream(reportFile)) {
dbTester.getDbClient().ceTaskInputDao().insert(dbTester.getSession(), TASK_UUID, input);
@@ -95,7 +93,7 @@ public class ExtractReportStepIT {
@Test
public void unzip_report_should_fail_if_unzip_size_exceed_threshold() throws Exception {
- logTester.setLevel(LoggerLevel.DEBUG);
+ logTester.setLevel(Level.DEBUG);
URL zipBombFile = getClass().getResource("/org/sonar/ce/task/projectanalysis/step/ExtractReportStepIT/zip-bomb.zip");
try (InputStream input = zipBombFile.openStream()) {
dbTester.getDbClient().ceTaskInputDao().insert(dbTester.getSession(), TASK_UUID, input);
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/metric/ReportMetricValidatorImplTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/metric/ReportMetricValidatorImplTest.java
index 80a12949173..236f161dd18 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/metric/ReportMetricValidatorImplTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/metric/ReportMetricValidatorImplTest.java
@@ -26,7 +26,6 @@ import org.junit.Rule;
import org.junit.Test;
import org.slf4j.event.Level;
import org.sonar.api.testfixtures.log.LogTester;
-import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.core.metric.ScannerMetrics;
import static org.assertj.core.api.Assertions.assertThat;
@@ -38,7 +37,7 @@ import static org.sonar.api.measures.Metric.ValueType;
public class ReportMetricValidatorImplTest {
@Rule
- public LogTester logTester = new LogTester().setLevel(LoggerLevel.DEBUG);
+ public LogTester logTester = new LogTester().setLevel(Level.DEBUG);
static final String METRIC_KEY = "metric_key";