This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 74a8abfb0c2 Unify class names from XXXUtil to XXXUtils (#36257)
74a8abfb0c2 is described below
commit 74a8abfb0c2a5f7ad8c4dccb81568c0fa77c59d8
Author: Liang Zhang <[email protected]>
AuthorDate: Mon Aug 11 21:11:32 2025 +0800
Unify class names from XXXUtil to XXXUtils (#36257)
---
.../protocol/FirebirdDateBinaryProtocolValue.java | 6 +++---
.../protocol/FirebirdTimeBinaryProtocolValue.java | 6 +++---
.../FirebirdTimestampBinaryProtocolValue.java | 8 ++++----
.../FirebirdTimestampTZBinaryProtocolValue.java | 8 ++++----
...dDateTimeUtil.java => FirebirdDateTimeUtils.java} | 20 ++++++++++----------
.../authentication/OpenGaussMacCalculator.java | 4 ++--
.../infra/util/props/PropertiesUtils.java | 2 +-
.../{HexStringUtil.java => HexStringUtils.java} | 2 +-
...exStringUtilTest.java => HexStringUtilsTest.java} | 8 ++++----
.../natived/commons/util/ProxyTestingServer.java | 2 +-
.../util/{ResourceUtil.java => ResourceUtils.java} | 8 ++++----
.../test/natived/jdbc/databases/ClickHouseTest.java | 4 ++--
.../test/natived/jdbc/databases/DorisFETest.java | 4 ++--
.../test/natived/jdbc/databases/FirebirdTest.java | 4 ++--
.../test/natived/jdbc/databases/MySQLTest.java | 4 ++--
.../test/natived/jdbc/databases/OpenGaussTest.java | 4 ++--
.../test/natived/jdbc/databases/PostgresTest.java | 4 ++--
.../test/natived/jdbc/databases/PrestoTest.java | 4 ++--
.../test/natived/jdbc/databases/SQLServerTest.java | 4 ++--
.../natived/jdbc/databases/hive/AcidTableTest.java | 4 ++--
.../natived/jdbc/databases/hive/IcebergTest.java | 4 ++--
.../jdbc/databases/hive/SystemSchemasTest.java | 4 ++--
.../hive/ZookeeperServiceDiscoveryTest.java | 4 ++--
.../test/natived/jdbc/features/EncryptTest.java | 4 ++--
.../test/natived/jdbc/features/MaskTest.java | 4 ++--
.../jdbc/features/ReadWriteSplittingTest.java | 4 ++--
.../test/natived/jdbc/features/ShadowTest.java | 4 ++--
.../test/natived/jdbc/features/ShardingTest.java | 4 ++--
.../test/natived/jdbc/modes/cluster/EtcdTest.java | 4 ++--
.../natived/jdbc/modes/cluster/ZookeeperTest.java | 4 ++--
.../natived/jdbc/transactions/base/SeataTest.java | 4 ++--
.../natived/jdbc/transactions/xa/AtomikosTest.java | 4 ++--
.../natived/jdbc/transactions/xa/NarayanaTest.java | 4 ++--
33 files changed, 81 insertions(+), 81 deletions(-)
diff --git
a/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/FirebirdDateBinaryProtocolValue.java
b/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/FirebirdDateBinaryProtocolValue.java
index 6e9f4c2e048..d86aed0025b 100644
---
a/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/FirebirdDateBinaryProtocolValue.java
+++
b/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/FirebirdDateBinaryProtocolValue.java
@@ -17,7 +17,7 @@
package
org.apache.shardingsphere.db.protocol.firebird.packet.command.query.statement.execute.protocol;
-import
org.apache.shardingsphere.db.protocol.firebird.packet.command.query.statement.execute.protocol.util.FirebirdDateTimeUtil;
+import
org.apache.shardingsphere.db.protocol.firebird.packet.command.query.statement.execute.protocol.util.FirebirdDateTimeUtils;
import
org.apache.shardingsphere.db.protocol.firebird.payload.FirebirdPacketPayload;
import java.sql.Timestamp;
@@ -31,13 +31,13 @@ public final class FirebirdDateBinaryProtocolValue
implements FirebirdBinaryProt
@Override
public Object read(final FirebirdPacketPayload payload) {
- return FirebirdDateTimeUtil.getDate(payload.readInt4());
+ return FirebirdDateTimeUtils.getDate(payload.readInt4());
}
@Override
public void write(final FirebirdPacketPayload payload, final Object value)
{
LocalDateTime localDateTime = value instanceof LocalDateTime ?
(LocalDateTime) value : new Timestamp(((Date)
value).getTime()).toLocalDateTime();
- payload.writeInt4(FirebirdDateTimeUtil.getEncodedDate(localDateTime));
+ payload.writeInt4(FirebirdDateTimeUtils.getEncodedDate(localDateTime));
}
@Override
diff --git
a/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/FirebirdTimeBinaryProtocolValue.java
b/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/FirebirdTimeBinaryProtocolValue.java
index 18082398c98..491431323a9 100644
---
a/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/FirebirdTimeBinaryProtocolValue.java
+++
b/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/FirebirdTimeBinaryProtocolValue.java
@@ -17,7 +17,7 @@
package
org.apache.shardingsphere.db.protocol.firebird.packet.command.query.statement.execute.protocol;
-import
org.apache.shardingsphere.db.protocol.firebird.packet.command.query.statement.execute.protocol.util.FirebirdDateTimeUtil;
+import
org.apache.shardingsphere.db.protocol.firebird.packet.command.query.statement.execute.protocol.util.FirebirdDateTimeUtils;
import
org.apache.shardingsphere.db.protocol.firebird.payload.FirebirdPacketPayload;
import java.sql.Time;
@@ -32,13 +32,13 @@ public final class FirebirdTimeBinaryProtocolValue
implements FirebirdBinaryProt
@Override
public Object read(final FirebirdPacketPayload payload) {
- return FirebirdDateTimeUtil.getTime(payload.readInt4());
+ return FirebirdDateTimeUtils.getTime(payload.readInt4());
}
@Override
public void write(final FirebirdPacketPayload payload, final Object value)
{
LocalDateTime localDateTime =
LocalDateTime.ofInstant(Instant.ofEpochMilli(((Time) value).getTime()),
ZoneId.systemDefault());
- payload.writeInt4(new
FirebirdDateTimeUtil(localDateTime).getEncodedTime());
+ payload.writeInt4(new
FirebirdDateTimeUtils(localDateTime).getEncodedTime());
}
@Override
diff --git
a/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/FirebirdTimestampBinaryProtocolValue.java
b/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/FirebirdTimestampBinaryProtocolValue.java
index fd539eaf752..bc9c2c0233f 100644
---
a/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/FirebirdTimestampBinaryProtocolValue.java
+++
b/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/FirebirdTimestampBinaryProtocolValue.java
@@ -17,7 +17,7 @@
package
org.apache.shardingsphere.db.protocol.firebird.packet.command.query.statement.execute.protocol;
-import
org.apache.shardingsphere.db.protocol.firebird.packet.command.query.statement.execute.protocol.util.FirebirdDateTimeUtil;
+import
org.apache.shardingsphere.db.protocol.firebird.packet.command.query.statement.execute.protocol.util.FirebirdDateTimeUtils;
import
org.apache.shardingsphere.db.protocol.firebird.payload.FirebirdPacketPayload;
import java.sql.Timestamp;
@@ -31,14 +31,14 @@ public final class FirebirdTimestampBinaryProtocolValue
implements FirebirdBinar
@Override
public Object read(final FirebirdPacketPayload payload) {
- return FirebirdDateTimeUtil.getDateTime(payload.readInt4(),
payload.readInt4());
+ return FirebirdDateTimeUtils.getDateTime(payload.readInt4(),
payload.readInt4());
}
@Override
public void write(final FirebirdPacketPayload payload, final Object value)
{
LocalDateTime localDateTime = value instanceof LocalDateTime ?
(LocalDateTime) value : new Timestamp(((Date)
value).getTime()).toLocalDateTime();
- payload.writeInt4(FirebirdDateTimeUtil.getEncodedDate(localDateTime));
- payload.writeInt4(new
FirebirdDateTimeUtil(localDateTime).getEncodedTime());
+ payload.writeInt4(FirebirdDateTimeUtils.getEncodedDate(localDateTime));
+ payload.writeInt4(new
FirebirdDateTimeUtils(localDateTime).getEncodedTime());
}
@Override
diff --git
a/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/FirebirdTimestampTZBinaryProtocolValue.java
b/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/FirebirdTimestampTZBinaryProtocolValue.java
index 529e7e751c3..b2ee9dfff53 100644
---
a/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/FirebirdTimestampTZBinaryProtocolValue.java
+++
b/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/FirebirdTimestampTZBinaryProtocolValue.java
@@ -17,7 +17,7 @@
package
org.apache.shardingsphere.db.protocol.firebird.packet.command.query.statement.execute.protocol;
-import
org.apache.shardingsphere.db.protocol.firebird.packet.command.query.statement.execute.protocol.util.FirebirdDateTimeUtil;
+import
org.apache.shardingsphere.db.protocol.firebird.packet.command.query.statement.execute.protocol.util.FirebirdDateTimeUtils;
import
org.apache.shardingsphere.db.protocol.firebird.payload.FirebirdPacketPayload;
import java.time.LocalDateTime;
@@ -31,14 +31,14 @@ public final class FirebirdTimestampTZBinaryProtocolValue
implements FirebirdBin
@Override
public Object read(final FirebirdPacketPayload payload) {
- return FirebirdDateTimeUtil.getDateTimeWithOffset(payload.readInt4(),
payload.readInt4(), payload.readInt4());
+ return FirebirdDateTimeUtils.getDateTimeWithOffset(payload.readInt4(),
payload.readInt4(), payload.readInt4());
}
@Override
public void write(final FirebirdPacketPayload payload, final Object value)
{
LocalDateTime localDateTime = ((OffsetDateTime)
value).atZoneSameInstant(ZoneOffset.UTC).toLocalDateTime();
- payload.writeInt4(FirebirdDateTimeUtil.getEncodedDate(localDateTime));
- payload.writeInt4(new
FirebirdDateTimeUtil(localDateTime).getEncodedTime());
+ payload.writeInt4(FirebirdDateTimeUtils.getEncodedDate(localDateTime));
+ payload.writeInt4(new
FirebirdDateTimeUtils(localDateTime).getEncodedTime());
payload.writeInt4(((OffsetDateTime)
value).getOffset().getTotalSeconds() / 60);
}
diff --git
a/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/util/FirebirdDateTimeUtil.java
b/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/util/FirebirdDateTimeUtils.java
similarity index 90%
rename from
db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/util/FirebirdDateTimeUtil.java
rename to
db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/util/FirebirdDateTimeUtils.java
index affc70b88d9..30e47109f25 100644
---
a/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/util/FirebirdDateTimeUtil.java
+++
b/db-protocol/firebird/src/main/java/org/apache/shardingsphere/db/protocol/firebird/packet/command/query/statement/execute/protocol/util/FirebirdDateTimeUtils.java
@@ -28,7 +28,7 @@ import java.time.LocalDateTime;
*/
@Getter
@Setter
-public final class FirebirdDateTimeUtil {
+public final class FirebirdDateTimeUtils {
static final int NANOSECONDS_PER_FRACTION = 100 * 1000;
@@ -54,7 +54,7 @@ public final class FirebirdDateTimeUtil {
private int fractions;
- public FirebirdDateTimeUtil(final LocalDateTime localDateTime) {
+ public FirebirdDateTimeUtils(final LocalDateTime localDateTime) {
year = localDateTime.getYear();
month = localDateTime.getMonthValue();
day = localDateTime.getDayOfMonth();
@@ -64,7 +64,7 @@ public final class FirebirdDateTimeUtil {
fractions = (localDateTime.getNano() / NANOSECONDS_PER_FRACTION) %
FRACTIONS_PER_SECOND;
}
- public FirebirdDateTimeUtil() {
+ public FirebirdDateTimeUtils() {
year = 0;
month = 1;
day = 1;
@@ -100,7 +100,7 @@ public final class FirebirdDateTimeUtil {
* @return encoded date as integer
*/
public static int getEncodedDate(final LocalDateTime localDateTime) {
- return new FirebirdDateTimeUtil(localDateTime).getEncodedDate();
+ return new FirebirdDateTimeUtils(localDateTime).getEncodedDate();
}
private int convertDate(final int c, final int ya, final int cpMonth) {
@@ -116,7 +116,7 @@ public final class FirebirdDateTimeUtil {
* @param encodedDate encoded date as integer
* @return this instance with updated date fields
*/
- public FirebirdDateTimeUtil setDate(final int encodedDate) {
+ public FirebirdDateTimeUtils setDate(final int encodedDate) {
int sqldate = encodedDate - 1721119 + 2400001;
int century = (4 * sqldate - 1) / 146097;
sqldate = 4 * sqldate - 1 - 146097 * century;
@@ -150,7 +150,7 @@ public final class FirebirdDateTimeUtil {
* @param encodedTime encoded time as integer
* @return this instance with updated time fields
*/
- public FirebirdDateTimeUtil setTime(final int encodedTime) {
+ public FirebirdDateTimeUtils setTime(final int encodedTime) {
int fractionsInDay = encodedTime;
hour = fractionsInDay / FRACTIONS_PER_HOUR;
fractionsInDay -= hour * FRACTIONS_PER_HOUR;
@@ -177,7 +177,7 @@ public final class FirebirdDateTimeUtil {
* @return timestamp representation of the encoded date
*/
public static Timestamp getDate(final int encodedDate) {
- return new FirebirdDateTimeUtil().setDate(encodedDate).asTimestamp();
+ return new FirebirdDateTimeUtils().setDate(encodedDate).asTimestamp();
}
/**
@@ -187,7 +187,7 @@ public final class FirebirdDateTimeUtil {
* @return timestamp representation of the encoded time
*/
public static Timestamp getTime(final int encodedTime) {
- return new FirebirdDateTimeUtil().setTime(encodedTime).asTimestamp();
+ return new FirebirdDateTimeUtils().setTime(encodedTime).asTimestamp();
}
/**
@@ -198,7 +198,7 @@ public final class FirebirdDateTimeUtil {
* @return timestamp representation of the encoded date and time
*/
public static Timestamp getDateTime(final int encodedDate, final int
encodedTime) {
- return new
FirebirdDateTimeUtil().setDate(encodedDate).setTime(encodedTime).asTimestamp();
+ return new
FirebirdDateTimeUtils().setDate(encodedDate).setTime(encodedTime).asTimestamp();
}
/**
@@ -211,6 +211,6 @@ public final class FirebirdDateTimeUtil {
*/
public static Timestamp getDateTimeWithOffset(final int encodedDate, final
int encodedTime, final int offset) {
// TODO add time zone support
- return new
FirebirdDateTimeUtil().setDate(encodedDate).setTime(encodedTime).asTimestamp();
+ return new
FirebirdDateTimeUtils().setDate(encodedDate).setTime(encodedTime).asTimestamp();
}
}
diff --git
a/db-protocol/opengauss/src/main/java/org/apache/shardingsphere/db/protocol/opengauss/packet/authentication/OpenGaussMacCalculator.java
b/db-protocol/opengauss/src/main/java/org/apache/shardingsphere/db/protocol/opengauss/packet/authentication/OpenGaussMacCalculator.java
index 78aa7961c86..8f8c75a8681 100644
---
a/db-protocol/opengauss/src/main/java/org/apache/shardingsphere/db/protocol/opengauss/packet/authentication/OpenGaussMacCalculator.java
+++
b/db-protocol/opengauss/src/main/java/org/apache/shardingsphere/db/protocol/opengauss/packet/authentication/OpenGaussMacCalculator.java
@@ -23,7 +23,7 @@ import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
-import org.apache.shardingsphere.infra.util.string.HexStringUtil;
+import org.apache.shardingsphere.infra.util.string.HexStringUtils;
import javax.crypto.Mac;
import javax.crypto.SecretKeyFactory;
@@ -59,7 +59,7 @@ public final class OpenGaussMacCalculator {
public static String requestServerMac(final String password, final
OpenGaussAuthenticationHexData authHexData, final int serverIteration) {
byte[] serverKey = getMacResult(generateSecretKey(password,
authHexData.getSalt(), serverIteration),
MacType.SERVER.data.getBytes(StandardCharsets.UTF_8));
byte[] result = getMacResult(serverKey,
toHexBytes(authHexData.getNonce()));
- return HexStringUtil.toHexString(result);
+ return HexStringUtils.toHexString(result);
}
/**
diff --git
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/props/PropertiesUtils.java
b/infra/util/src/main/java/org/apache/shardingsphere/infra/util/props/PropertiesUtils.java
index 4fd215df248..36cad2a9b26 100644
---
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/props/PropertiesUtils.java
+++
b/infra/util/src/main/java/org/apache/shardingsphere/infra/util/props/PropertiesUtils.java
@@ -25,7 +25,7 @@ import java.util.TreeMap;
import java.util.stream.Collectors;
/**
- * Properties utilities.
+ * Properties utility class.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class PropertiesUtils {
diff --git
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/string/HexStringUtil.java
b/infra/util/src/main/java/org/apache/shardingsphere/infra/util/string/HexStringUtils.java
similarity index 97%
rename from
infra/util/src/main/java/org/apache/shardingsphere/infra/util/string/HexStringUtil.java
rename to
infra/util/src/main/java/org/apache/shardingsphere/infra/util/string/HexStringUtils.java
index bdd7aed7e93..b1fdf655bcd 100644
---
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/string/HexStringUtil.java
+++
b/infra/util/src/main/java/org/apache/shardingsphere/infra/util/string/HexStringUtils.java
@@ -24,7 +24,7 @@ import lombok.NoArgsConstructor;
* Hex string utility class.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class HexStringUtil {
+public final class HexStringUtils {
/**
* Convert byte array to hex string.
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/string/HexStringUtilTest.java
b/infra/util/src/test/java/org/apache/shardingsphere/infra/util/string/HexStringUtilsTest.java
similarity index 78%
rename from
infra/util/src/test/java/org/apache/shardingsphere/infra/util/string/HexStringUtilTest.java
rename to
infra/util/src/test/java/org/apache/shardingsphere/infra/util/string/HexStringUtilsTest.java
index 99cda499fa0..357914a8ae3 100644
---
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/string/HexStringUtilTest.java
+++
b/infra/util/src/test/java/org/apache/shardingsphere/infra/util/string/HexStringUtilsTest.java
@@ -22,12 +22,12 @@ import org.junit.jupiter.api.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
-class HexStringUtilTest {
+class HexStringUtilsTest {
@Test
void assertToHexString() {
- assertThat(HexStringUtil.toHexString(new byte[]{(byte) 1}), is("01"));
- assertThat(HexStringUtil.toHexString(new byte[]{(byte) 100}),
is("64"));
- assertThat(HexStringUtil.toHexString(new byte[]{(byte) 255, (byte)
256}), is("ff00"));
+ assertThat(HexStringUtils.toHexString(new byte[]{(byte) 1}), is("01"));
+ assertThat(HexStringUtils.toHexString(new byte[]{(byte) 100}),
is("64"));
+ assertThat(HexStringUtils.toHexString(new byte[]{(byte) 255, (byte)
256}), is("ff00"));
}
}
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/util/ProxyTestingServer.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/util/ProxyTestingServer.java
index 17b6a1eb8d3..87769b9ea5e 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/util/ProxyTestingServer.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/util/ProxyTestingServer.java
@@ -64,7 +64,7 @@ public final class ProxyTestingServer {
* @param logicDataBaseNameList List of logical database names created by
Proxy.
*/
public void close(final List<String> logicDataBaseNameList) {
- ResourceUtil.closeProxyDataSource(logicDataBaseNameList);
+ ResourceUtils.closeProxyDataSource(logicDataBaseNameList);
completableFuture.cancel(false);
Awaitility.await().atMost(1L,
TimeUnit.MINUTES).until(completableFuture::isDone);
}
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/util/ResourceUtil.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/util/ResourceUtils.java
similarity index 97%
rename from
test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/util/ResourceUtil.java
rename to
test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/util/ResourceUtils.java
index b937c686a35..119e16b5c44 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/util/ResourceUtil.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/util/ResourceUtils.java
@@ -37,7 +37,7 @@ import java.util.List;
*
* @see
org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource#close()
*/
-public class ResourceUtil {
+public class ResourceUtils {
/**
* Close JDBC dataSource.
@@ -48,7 +48,7 @@ public class ResourceUtil {
public static void closeJdbcDataSource(final DataSource dataSource) throws
SQLException {
try (Connection connection = dataSource.getConnection()) {
ContextManager contextManager =
connection.unwrap(ShardingSphereConnection.class).getContextManager();
-
contextManager.getStorageUnits(DefaultDatabase.LOGIC_NAME).values().stream().map(StorageUnit::getDataSource).forEach(ResourceUtil::close);
+
contextManager.getStorageUnits(DefaultDatabase.LOGIC_NAME).values().stream().map(StorageUnit::getDataSource).forEach(ResourceUtils::close);
contextManager.close();
}
}
@@ -64,7 +64,7 @@ public class ResourceUtil {
public static void closeJdbcDataSource(final DataSource dataSource, final
String logicDataBaseName) throws SQLException {
try (Connection connection = dataSource.getConnection()) {
ContextManager contextManager =
connection.unwrap(ShardingSphereConnection.class).getContextManager();
-
contextManager.getStorageUnits(logicDataBaseName).values().stream().map(StorageUnit::getDataSource).forEach(ResourceUtil::close);
+
contextManager.getStorageUnits(logicDataBaseName).values().stream().map(StorageUnit::getDataSource).forEach(ResourceUtils::close);
contextManager.close();
}
}
@@ -80,7 +80,7 @@ public class ResourceUtil {
.values()
.stream()
.map(StorageUnit::getDataSource)
- .forEach(ResourceUtil::close));
+ .forEach(ResourceUtils::close));
contextManager.close();
}
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/ClickHouseTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/ClickHouseTest.java
index ed0276600da..7a0170cba97 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/ClickHouseTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/ClickHouseTest.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.test.natived.jdbc.databases;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.apache.shardingsphere.test.natived.commons.TestShardingService;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledInNativeImage;
@@ -38,7 +38,7 @@ class ClickHouseTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
ContainerDatabaseDriver.killContainers();
}
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/DorisFETest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/DorisFETest.java
index b4e403ce422..632ece7547a 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/DorisFETest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/DorisFETest.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.test.natived.jdbc.databases;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.apache.shardingsphere.test.natived.commons.TestShardingService;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
@@ -71,7 +71,7 @@ class DorisFETest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
System.clearProperty(systemPropKeyPrefix + "ds0.jdbc-url");
System.clearProperty(systemPropKeyPrefix + "ds1.jdbc-url");
System.clearProperty(systemPropKeyPrefix + "ds2.jdbc-url");
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/FirebirdTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/FirebirdTest.java
index 4e11ebd61de..4b25bbde04c 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/FirebirdTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/FirebirdTest.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.test.natived.jdbc.databases;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.apache.shardingsphere.test.natived.commons.TestShardingService;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.awaitility.Awaitility;
import org.firebirdsql.management.FBManager;
import org.firebirdsql.management.PageSizeConstants;
@@ -76,7 +76,7 @@ class FirebirdTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
System.clearProperty(systemPropKeyPrefix + "ds0.jdbc-url");
System.clearProperty(systemPropKeyPrefix + "ds1.jdbc-url");
System.clearProperty(systemPropKeyPrefix + "ds2.jdbc-url");
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/MySQLTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/MySQLTest.java
index 935922db3ee..0a415441283 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/MySQLTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/MySQLTest.java
@@ -21,7 +21,7 @@ import com.mysql.cj.jdbc.exceptions.CommunicationsException;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.apache.shardingsphere.test.natived.commons.TestShardingService;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
@@ -76,7 +76,7 @@ class MySQLTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
System.clearProperty(systemPropKeyPrefix + "ds0.jdbc-url");
System.clearProperty(systemPropKeyPrefix + "ds1.jdbc-url");
System.clearProperty(systemPropKeyPrefix + "ds2.jdbc-url");
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/OpenGaussTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/OpenGaussTest.java
index 3dd16ad599b..3f8023d62fa 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/OpenGaussTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/OpenGaussTest.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.test.natived.jdbc.databases;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.apache.shardingsphere.test.natived.commons.TestShardingService;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
@@ -71,7 +71,7 @@ class OpenGaussTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
System.clearProperty(systemPropKeyPrefix + "ds0.jdbc-url");
System.clearProperty(systemPropKeyPrefix + "ds1.jdbc-url");
System.clearProperty(systemPropKeyPrefix + "ds2.jdbc-url");
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/PostgresTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/PostgresTest.java
index fbe2fdb1ca9..f3f91a48661 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/PostgresTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/PostgresTest.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.test.natived.jdbc.databases;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.apache.shardingsphere.test.natived.commons.TestShardingService;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledInNativeImage;
@@ -38,7 +38,7 @@ class PostgresTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
ContainerDatabaseDriver.killContainers();
}
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/PrestoTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/PrestoTest.java
index 972519ec035..9b14d066fc7 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/PrestoTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/PrestoTest.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.test.natived.jdbc.databases;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.apache.shardingsphere.test.natived.commons.TestShardingService;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
@@ -77,7 +77,7 @@ class PrestoTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
System.clearProperty(systemPropKeyPrefix + "ds0.jdbc-url");
System.clearProperty(systemPropKeyPrefix + "ds1.jdbc-url");
System.clearProperty(systemPropKeyPrefix + "ds2.jdbc-url");
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/SQLServerTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/SQLServerTest.java
index 7eabe1b5043..91d68672560 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/SQLServerTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/SQLServerTest.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.test.natived.jdbc.databases;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.apache.shardingsphere.test.natived.commons.TestShardingService;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledInNativeImage;
@@ -38,7 +38,7 @@ class SQLServerTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
ContainerDatabaseDriver.killContainers();
}
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/AcidTableTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/AcidTableTest.java
index 1a57ab1ba82..593cd3a3874 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/AcidTableTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/AcidTableTest.java
@@ -20,7 +20,7 @@ package
org.apache.shardingsphere.test.natived.jdbc.databases.hive;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.apache.shardingsphere.test.natived.commons.TestShardingService;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
@@ -73,7 +73,7 @@ class AcidTableTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
System.clearProperty(systemPropKeyPrefix + "ds0.jdbc-url");
System.clearProperty(systemPropKeyPrefix + "ds1.jdbc-url");
System.clearProperty(systemPropKeyPrefix + "ds2.jdbc-url");
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/IcebergTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/IcebergTest.java
index 0ce6c4d6465..26ae7cfde8a 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/IcebergTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/IcebergTest.java
@@ -20,7 +20,7 @@ package
org.apache.shardingsphere.test.natived.jdbc.databases.hive;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.apache.shardingsphere.test.natived.commons.TestShardingService;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
@@ -70,7 +70,7 @@ class IcebergTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
System.clearProperty(systemPropKeyPrefix + "ds0.jdbc-url");
System.clearProperty(systemPropKeyPrefix + "ds1.jdbc-url");
System.clearProperty(systemPropKeyPrefix + "ds2.jdbc-url");
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/SystemSchemasTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/SystemSchemasTest.java
index 53a10b6cf37..1104c647f56 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/SystemSchemasTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/SystemSchemasTest.java
@@ -20,7 +20,7 @@ package
org.apache.shardingsphere.test.natived.jdbc.databases.hive;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.apache.shardingsphere.test.natived.commons.TestShardingService;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.AutoClose;
@@ -91,7 +91,7 @@ class SystemSchemasTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
System.clearProperty(systemPropKeyPrefix + "ds0.jdbc-url");
System.clearProperty(systemPropKeyPrefix + "ds1.jdbc-url");
System.clearProperty(systemPropKeyPrefix + "ds2.jdbc-url");
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/ZookeeperServiceDiscoveryTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/ZookeeperServiceDiscoveryTest.java
index 17979542414..d76b8ad4a16 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/ZookeeperServiceDiscoveryTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/hive/ZookeeperServiceDiscoveryTest.java
@@ -24,7 +24,7 @@ import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.ExponentialBackoffRetry;
import org.apache.curator.test.InstanceSpec;
import org.apache.shardingsphere.test.natived.commons.TestShardingService;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.AutoClose;
@@ -84,7 +84,7 @@ class ZookeeperServiceDiscoveryTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
System.clearProperty(systemPropKeyPrefix + "ds0.jdbc-url");
System.clearProperty(systemPropKeyPrefix + "ds1.jdbc-url");
System.clearProperty(systemPropKeyPrefix + "ds2.jdbc-url");
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/EncryptTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/EncryptTest.java
index 97b57af417f..9319e9ed848 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/EncryptTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/EncryptTest.java
@@ -25,7 +25,7 @@ import
org.apache.shardingsphere.test.natived.commons.entity.OrderItem;
import
org.apache.shardingsphere.test.natived.commons.repository.AddressRepository;
import
org.apache.shardingsphere.test.natived.commons.repository.OrderItemRepository;
import
org.apache.shardingsphere.test.natived.commons.repository.OrderRepository;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
@@ -52,7 +52,7 @@ class EncryptTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
}
@Test
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/MaskTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/MaskTest.java
index 071a7666c40..a7d1bb57485 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/MaskTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/MaskTest.java
@@ -25,7 +25,7 @@ import
org.apache.shardingsphere.test.natived.commons.entity.OrderItem;
import
org.apache.shardingsphere.test.natived.commons.repository.AddressRepository;
import
org.apache.shardingsphere.test.natived.commons.repository.OrderItemRepository;
import
org.apache.shardingsphere.test.natived.commons.repository.OrderRepository;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
@@ -53,7 +53,7 @@ class MaskTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
}
@Test
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/ReadWriteSplittingTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/ReadWriteSplittingTest.java
index f3390c9a9e9..b665a6edb79 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/ReadWriteSplittingTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/ReadWriteSplittingTest.java
@@ -25,7 +25,7 @@ import
org.apache.shardingsphere.test.natived.commons.entity.OrderItem;
import
org.apache.shardingsphere.test.natived.commons.repository.AddressRepository;
import
org.apache.shardingsphere.test.natived.commons.repository.OrderItemRepository;
import
org.apache.shardingsphere.test.natived.commons.repository.OrderRepository;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.h2.jdbc.JdbcSQLSyntaxErrorException;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
@@ -49,7 +49,7 @@ class ReadWriteSplittingTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
}
@Test
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/ShadowTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/ShadowTest.java
index 34b2b0f1aa7..9d9ce64919e 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/ShadowTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/ShadowTest.java
@@ -25,7 +25,7 @@ import
org.apache.shardingsphere.test.natived.commons.entity.OrderItem;
import
org.apache.shardingsphere.test.natived.commons.repository.AddressRepository;
import
org.apache.shardingsphere.test.natived.commons.repository.OrderItemRepository;
import
org.apache.shardingsphere.test.natived.commons.repository.OrderRepository;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
@@ -53,7 +53,7 @@ class ShadowTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
}
@Test
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/ShardingTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/ShardingTest.java
index ec930bc9be0..55850e38044 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/ShardingTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/features/ShardingTest.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.test.natived.jdbc.features;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.apache.shardingsphere.test.natived.commons.TestShardingService;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
@@ -35,7 +35,7 @@ class ShardingTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
}
@Test
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/modes/cluster/EtcdTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/modes/cluster/EtcdTest.java
index cbf6b7ece10..44965cc4902 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/modes/cluster/EtcdTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/modes/cluster/EtcdTest.java
@@ -21,7 +21,7 @@ import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import io.etcd.jetcd.test.EtcdClusterExtension;
import org.apache.shardingsphere.test.natived.commons.TestShardingService;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
@@ -69,7 +69,7 @@ class EtcdTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
System.clearProperty(systemPropKeyPrefix + "server-lists");
}
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/modes/cluster/ZookeeperTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/modes/cluster/ZookeeperTest.java
index ecf9b8701ae..bfbb1c9e8ac 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/modes/cluster/ZookeeperTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/modes/cluster/ZookeeperTest.java
@@ -24,7 +24,7 @@ import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.ExponentialBackoffRetry;
import org.apache.curator.test.TestingServer;
import org.apache.shardingsphere.test.natived.commons.TestShardingService;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
@@ -58,7 +58,7 @@ class ZookeeperTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
System.clearProperty(systemPropKeyPrefix + "server-lists");
}
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/transactions/base/SeataTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/transactions/base/SeataTest.java
index d2ee7929c10..a80275762c9 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/transactions/base/SeataTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/transactions/base/SeataTest.java
@@ -21,7 +21,7 @@ import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.apache.hc.core5.http.HttpStatus;
import org.apache.shardingsphere.test.natived.commons.TestShardingService;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
@@ -72,7 +72,7 @@ class SeataTest {
void afterEach() throws SQLException {
Awaitility.await().pollDelay(5L, TimeUnit.SECONDS).until(() -> true);
System.clearProperty(serviceDefaultGroupListKey);
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
ContainerDatabaseDriver.killContainers();
}
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/transactions/xa/AtomikosTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/transactions/xa/AtomikosTest.java
index af5e11eae38..7d6c6811de6 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/transactions/xa/AtomikosTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/transactions/xa/AtomikosTest.java
@@ -20,7 +20,7 @@ package
org.apache.shardingsphere.test.natived.jdbc.transactions.xa;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.apache.shardingsphere.test.natived.commons.TestShardingService;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
@@ -35,7 +35,7 @@ class AtomikosTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
}
@Test
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/transactions/xa/NarayanaTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/transactions/xa/NarayanaTest.java
index 51cafcd36e5..05eb7599e07 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/transactions/xa/NarayanaTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/transactions/xa/NarayanaTest.java
@@ -22,7 +22,7 @@ import com.arjuna.ats.arjuna.common.arjPropertyManager;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.apache.shardingsphere.test.natived.commons.TestShardingService;
-import org.apache.shardingsphere.test.natived.commons.util.ResourceUtil;
+import org.apache.shardingsphere.test.natived.commons.util.ResourceUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
@@ -37,7 +37,7 @@ class NarayanaTest {
@AfterEach
void afterEach() throws SQLException {
- ResourceUtil.closeJdbcDataSource(logicDataSource);
+ ResourceUtils.closeJdbcDataSource(logicDataSource);
}
@Test