From: Dimitris Kavvathas Date: Wed, 8 Mar 2023 17:05:26 +0000 (+0100) Subject: SONAR-18627 Drop overridden deprecated methods from DbTester X-Git-Tag: 10.0.0.68432~162 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=273f7412c5a26b9c18abed66c7ffc154a94e9746;p=sonarqube.git SONAR-18627 Drop overridden deprecated methods from DbTester --- 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(); }