From 273f7412c5a26b9c18abed66c7ffc154a94e9746 Mon Sep 17 00:00:00 2001 From: Dimitris Kavvathas Date: Wed, 8 Mar 2023 18:05:26 +0100 Subject: [PATCH] SONAR-18627 Drop overridden deprecated methods from DbTester --- .../java/org/sonar/db/IsAliveMapperTest.java | 2 +- .../java/org/sonar/db/DbTester.java | 20 ------------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/IsAliveMapperTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/IsAliveMapperTest.java index 505d9ad49ba..a517c824c95 100644 --- a/server/sonar-db-dao/src/test/java/org/sonar/db/IsAliveMapperTest.java +++ b/server/sonar-db-dao/src/test/java/org/sonar/db/IsAliveMapperTest.java @@ -36,7 +36,7 @@ public class IsAliveMapperTest { @Before public void setUp() { - session = dbTester.myBatis().openSession(false); + session = dbTester.getSession(); underTest = session.getMapper(IsAliveMapper.class); } diff --git a/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/DbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/DbTester.java index 979ee39d690..dafd9db00d8 100644 --- a/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/DbTester.java +++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/DbTester.java @@ -21,7 +21,6 @@ package org.sonar.db; import com.zaxxer.hikari.HikariDataSource; import java.sql.Connection; -import java.sql.SQLException; import java.util.Arrays; import java.util.Comparator; import java.util.List; @@ -288,25 +287,6 @@ public class DbTester extends AbstractDbTester { return super.selectFirst(selectSql, new DbSessionConnectionSupplier(dbSession)); } - @Deprecated - public MyBatis myBatis() { - return db.getMyBatis(); - } - - @Deprecated - public Connection openConnection() throws SQLException { - return getConnection(); - } - - private Connection getConnection() throws SQLException { - return db.getDatabase().getDataSource().getConnection(); - } - - @Deprecated - public Database database() { - return db.getDatabase(); - } - public String getUrl() { return ((HikariDataSource) db.getDatabase().getDataSource()).getJdbcUrl(); } -- 2.39.5