This is an automated email from the ASF dual-hosted git repository.
sunnianjun 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 830dfc8d8e6 Fix code inspection for test module (#31216)
830dfc8d8e6 is described below
commit 830dfc8d8e63909a59ef8b1cd45ba7bf8b1a6ef4
Author: Liang Zhang <[email protected]>
AuthorDate: Sun May 12 17:07:16 2024 +0800
Fix code inspection for test module (#31216)
---
RELEASE-NOTES.md | 2 +-
..._2022_Understanding_Apache_ShardingSphere.en.md | 2 +-
...Sphere-Proxy\342\200\231s_Authentication.en.md" | 4 +-
.../test-manual/pipeline-e2e-test/_index.en.md | 2 +-
.../cdc/util/DataRecordResultConvertUtilsTest.java | 2 +-
.../agent/jdbc/project/JdbcProjectApplication.java | 2 +-
.../jdbc/project/controller/OrderController.java | 12 ++---
.../container/ShardingSphereJdbcContainer.java | 2 +-
.../container/ShardingSphereProxyContainer.java | 2 +-
.../e2e/agent/common/env/E2ETestEnvironment.java | 4 +-
.../agent/common/request/ProxyRequestExecutor.java | 2 +-
.../test/e2e/agent/common/util/OkHttpUtils.java | 6 +--
.../atomic/storage/DockerStorageContainer.java | 6 +--
.../config/StorageContainerConfiguration.java | 2 +-
.../atomic/storage/impl/OpenGaussContainer.java | 2 +-
.../atomic/util/StorageContainerUtils.java | 2 +-
.../scenario/authority/AuthorityEnvironment.java | 2 +-
.../database/DatabaseEnvironmentManager.java | 2 +-
.../ITStandardShardingAlgorithmFixture.java | 2 +-
.../pipeline/cases/PipelineContainerComposer.java | 10 ++--
.../cases/cdc/DataSourceRecordConsumer.java | 9 ++--
.../general/MySQLMigrationGeneralE2EIT.java | 2 +-
.../general/PostgreSQLMigrationGeneralE2EIT.java | 2 +-
.../general/PostgreSQLToMySQLMigrationE2EIT.java | 2 +-
.../pipeline/cases/task/E2EIncrementalTask.java | 4 +-
.../MultiJDBCConnectionsTestCase.java | 4 +-
.../cases/cursor/OpenGaussCursorTestCase.java | 2 +-
.../engine/base/TransactionBaseE2EIT.java | 12 ++---
.../engine/base/TransactionTestCase.java | 2 +-
.../transaction/env/TransactionE2EEnvironment.java | 2 +-
.../container/compose/BaseContainerComposer.java | 2 +-
.../container/compose/DockerContainerComposer.java | 2 +-
.../mysql/MySQLContainerConfigurationFactory.java | 2 +-
.../e2e/transaction/util/TestCaseClassScanner.java | 4 +-
.../e2e/engine/type/dql/AdditionalDQLE2EIT.java | 8 +--
.../test/e2e/engine/type/dql/GeneralDQLE2EIT.java | 4 +-
.../segment/expression/ExpressionAssert.java | 4 +-
.../segment/hint/WithTableHintClauseAssert.java | 4 +-
.../segment/insert/InsertExecClauseAssert.java | 2 +-
.../asserts/segment/owner/OwnerAssert.java | 2 +-
.../AlterTransmissionRuleStatementAssert.java | 2 +-
.../StandardPipelineTableMetaDataLoaderTest.java | 4 +-
.../RecordSingleTableInventoryCalculatorTest.java | 4 +-
.../pipeline/core/fixture/EmbedTestingServer.java | 6 +--
.../FixtureTransmissionJobItemContext.java | 4 +-
.../repository/PipelineGovernanceFacadeTest.java | 2 +-
.../pipeline/core/task/IncrementalTaskTest.java | 2 +-
.../data/pipeline/core/task/InventoryTaskTest.java | 5 +-
.../core/util/PipelineDistributedBarrierTest.java | 4 +-
.../migration/api/impl/MigrationJobAPITest.java | 4 +-
.../YamlMigrationJobConfigurationSwapperTest.java | 2 +-
.../natived/jdbc/commons/TestShardingService.java | 11 ++--
.../test/natived/jdbc/databases/MySQLTest.java | 4 +-
.../test/natived/jdbc/databases/OpenGaussTest.java | 4 +-
.../test/natived/jdbc/databases/PostgresTest.java | 2 +-
.../test/natived/jdbc/databases/SQLServerTest.java | 2 +-
.../test/natived/jdbc/features/EncryptTest.java | 14 +++---
.../test/natived/jdbc/features/MaskTest.java | 19 +++----
.../jdbc/features/ReadWriteSplittingTest.java | 6 +--
.../test/natived/jdbc/features/ShadowTest.java | 58 +++++++++++-----------
.../test/natived/jdbc/features/ShardingTest.java | 2 +-
.../natived/jdbc/transactions/base/SeataTest.java | 2 +-
.../natived/jdbc/transactions/xa/AtomikosTest.java | 2 +-
.../natived/jdbc/transactions/xa/NarayanaTest.java | 2 +-
64 files changed, 156 insertions(+), 156 deletions(-)
diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md
index 5a81fb02a90..4158093a069 100644
--- a/RELEASE-NOTES.md
+++ b/RELEASE-NOTES.md
@@ -258,7 +258,7 @@
1. Kernel: Fix use Consul in cluster mode start up failure
1. DB Discovery: Close heartbeat job when drop discovery rule
1. Kernel: Fix wrong decide result when execute same sharding condition
subquery with SQL federation
-1. Kernel: Fix priority problem of UNION, INTERSECT, EXCEPT set operation in
SQL Federation for PostgreSQL and openGuass dialect
+1. Kernel: Fix priority problem of UNION, INTERSECT, EXCEPT set operation in
SQL Federation for PostgreSQL and openGauss dialect
1. Kernel: Fix create view index out of range exception when view contains
set operator
1. Kernel: Add XA resource exceeds length check
1. Kernel: Fix transaction support for spring requires_new
diff --git
a/docs/blog/content/material/2022_04_06_A_Holistic_Pluggable_Platform_for_Data_Sharding_ICDE_2022_Understanding_Apache_ShardingSphere.en.md
b/docs/blog/content/material/2022_04_06_A_Holistic_Pluggable_Platform_for_Data_Sharding_ICDE_2022_Understanding_Apache_ShardingSphere.en.md
index 5d2a35884ed..5d07f2f5efa 100644
---
a/docs/blog/content/material/2022_04_06_A_Holistic_Pluggable_Platform_for_Data_Sharding_ICDE_2022_Understanding_Apache_ShardingSphere.en.md
+++
b/docs/blog/content/material/2022_04_06_A_Holistic_Pluggable_Platform_for_Data_Sharding_ICDE_2022_Understanding_Apache_ShardingSphere.en.md
@@ -55,7 +55,7 @@ Currently, more than 170 companies are using ShardingSphere.
This article is bas
## System Architecture and Data Flow
As shown in Figure 2, ShardingSphere can be divided into five modules:
-1. **dData source:** It enables storage by integrating various databases and
currently supports data sources such as MySQL, PostgreSQL, SQL Server, Oracle,
MariaDB and openGuass.
+1. **dData source:** It enables storage by integrating various databases and
currently supports data sources such as MySQL, PostgreSQL, SQL Server, Oracle,
MariaDB and openGauss.
2. **Function:** It provides many out-of-the-box features that can be freely
added, combined, or deleted as needed.
3. **Governor** is mainly used for configuration management and health
monitoring.
4. **SQL engine.** With the complete data sharding SQL engine, all functions
are pluggable, and any function can be implemented through a SQL statement.
diff --git
"a/docs/blog/content/material/2023_05_18_Enhancing_Database_Security_ShardingSphere-Proxy\342\200\231s_Authentication.en.md"
"b/docs/blog/content/material/2023_05_18_Enhancing_Database_Security_ShardingSphere-Proxy\342\200\231s_Authentication.en.md"
index 93bef78784d..8e89b63dd60 100644
---
"a/docs/blog/content/material/2023_05_18_Enhancing_Database_Security_ShardingSphere-Proxy\342\200\231s_Authentication.en.md"
+++
"b/docs/blog/content/material/2023_05_18_Enhancing_Database_Security_ShardingSphere-Proxy\342\200\231s_Authentication.en.md"
@@ -175,7 +175,7 @@ Connection failed.
We see that it’s actually due to the authentication protocol.
-The psql client requires md5 protocol authentication by default, but because
Proxy requires the scram-sha-256 under the openGuass protocol, the negotiation
fails and an exception is thrown.
+The psql client requires md5 protocol authentication by default, but because
Proxy requires the scram-sha-256 under the openGauss protocol, the negotiation
fails and an exception is thrown.
## Following Steps
@@ -229,7 +229,7 @@ Connection succeeded.

-Now we see that `psql` has successfully connected to ShardingSphere-Proxy
under the openGuass protocol.
+Now we see that `psql` has successfully connected to ShardingSphere-Proxy
under the openGauss protocol.

diff --git a/docs/document/content/test-manual/pipeline-e2e-test/_index.en.md
b/docs/document/content/test-manual/pipeline-e2e-test/_index.en.md
index 25bb7593306..065db93d5a3 100644
--- a/docs/document/content/test-manual/pipeline-e2e-test/_index.en.md
+++ b/docs/document/content/test-manual/pipeline-e2e-test/_index.en.md
@@ -14,7 +14,7 @@ Currently, NATIVE and DOCKER are available.
1. NATIVE : Run on developer local machine. Need to start ShardingSphere-Proxy
instance and database instance by developer. It could be used for local
debugging.
2. DOCKER : Run on docker started by Maven plugin. It could be used for GitHub
Actions, and it could be used for local debugging too.
-Supported databases: MySQL, PostgreSQL and openGuass.
+Supported databases: MySQL, PostgreSQL and openGauss.
## User guide
diff --git
a/kernel/data-pipeline/scenario/cdc/core/src/test/java/org/apache/shardingsphere/data/pipeline/cdc/util/DataRecordResultConvertUtilsTest.java
b/kernel/data-pipeline/scenario/cdc/core/src/test/java/org/apache/shardingsphere/data/pipeline/cdc/util/DataRecordResultConvertUtilsTest.java
index 0f3c39146d5..dcf869ea781 100644
---
a/kernel/data-pipeline/scenario/cdc/core/src/test/java/org/apache/shardingsphere/data/pipeline/cdc/util/DataRecordResultConvertUtilsTest.java
+++
b/kernel/data-pipeline/scenario/cdc/core/src/test/java/org/apache/shardingsphere/data/pipeline/cdc/util/DataRecordResultConvertUtilsTest.java
@@ -57,7 +57,7 @@ class DataRecordResultConvertUtilsTest {
void assertConvertDataRecordToRecord() throws
InvalidProtocolBufferException, SQLException {
DataRecord dataRecord = new
DataRecord(PipelineSQLOperationType.INSERT, "t_order", new
IntegerPrimaryKeyIngestPosition(0L, 1L), 2);
dataRecord.addColumn(new Column("order_id", BigInteger.ONE, false,
true));
- dataRecord.addColumn(new Column("price", BigDecimal.valueOf(123),
false, false));
+ dataRecord.addColumn(new Column("price", BigDecimal.valueOf(123L),
false, false));
dataRecord.addColumn(new Column("user_id", Long.MAX_VALUE, false,
false));
dataRecord.addColumn(new Column("item_id", Integer.MAX_VALUE, false,
false));
dataRecord.addColumn(new Column("create_date", LocalDate.now(), false,
false));
diff --git
a/test/e2e/agent/jdbc-project/src/main/java/org/apache/shardingsphere/test/e2e/agent/jdbc/project/JdbcProjectApplication.java
b/test/e2e/agent/jdbc-project/src/main/java/org/apache/shardingsphere/test/e2e/agent/jdbc/project/JdbcProjectApplication.java
index 50f0624a767..ee49bd6397d 100644
---
a/test/e2e/agent/jdbc-project/src/main/java/org/apache/shardingsphere/test/e2e/agent/jdbc/project/JdbcProjectApplication.java
+++
b/test/e2e/agent/jdbc-project/src/main/java/org/apache/shardingsphere/test/e2e/agent/jdbc/project/JdbcProjectApplication.java
@@ -55,7 +55,7 @@ public final class JdbcProjectApplication {
Connection connection = getConnection();
OrderService orderService = new OrderServiceImpl(connection);
OrderController orderController = new OrderController(orderService);
- long endTime = System.currentTimeMillis() + (5 * 60 * 1000);
+ long endTime = System.currentTimeMillis() + (5L * 60L * 1000L);
while (System.currentTimeMillis() < endTime) {
orderController.dropTable();
orderController.createTable();
diff --git
a/test/e2e/agent/jdbc-project/src/main/java/org/apache/shardingsphere/test/e2e/agent/jdbc/project/controller/OrderController.java
b/test/e2e/agent/jdbc-project/src/main/java/org/apache/shardingsphere/test/e2e/agent/jdbc/project/controller/OrderController.java
index 4003fc068ef..b3c53519a9d 100644
---
a/test/e2e/agent/jdbc-project/src/main/java/org/apache/shardingsphere/test/e2e/agent/jdbc/project/controller/OrderController.java
+++
b/test/e2e/agent/jdbc-project/src/main/java/org/apache/shardingsphere/test/e2e/agent/jdbc/project/controller/OrderController.java
@@ -50,10 +50,10 @@ public final class OrderController {
* Insert order.
*/
public void insert() {
- long index = 0;
- while (index++ <= 100) {
+ long index = 0L;
+ while (index++ <= 100L) {
OrderEntity order = new OrderEntity(index, index, "OK");
- orderService.insert(order, 0 == (index & 1) ?
StatementType.STATEMENT : StatementType.PREPARED, 0 == index % 5);
+ orderService.insert(order, 0L == (index & 1L) ?
StatementType.STATEMENT : StatementType.PREPARED, 0L == index % 5L);
}
}
@@ -61,10 +61,10 @@ public final class OrderController {
* Create error request.
*/
public void createErrorRequest() {
- long index = 0;
- while (index++ <= 10) {
+ long index = 0L;
+ while (index++ <= 10L) {
OrderEntity order = new OrderEntity(index, index, "Fail");
- orderService.insert(order, 0 == (index & 1) ?
StatementType.STATEMENT : StatementType.PREPARED, false);
+ orderService.insert(order, 0L == (index & 1L) ?
StatementType.STATEMENT : StatementType.PREPARED, false);
}
}
diff --git
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/ShardingSphereJdbcContainer.java
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/ShardingSphereJdbcContainer.java
index 062ade73c49..6f383c8ae9b 100644
---
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/ShardingSphereJdbcContainer.java
+++
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/ShardingSphereJdbcContainer.java
@@ -57,7 +57,7 @@ public final class ShardingSphereJdbcContainer extends
DockerITContainer {
}
private Map<String, String> createResourceMappingForProxy() {
- Map<String, String> result = new HashMap<>();
+ Map<String, String> result = new HashMap<>(2, 1F);
result.put("/env/jdbc/conf/config.yaml", CONFIG_PATH_IN_CONTAINER +
"conf/config.yaml");
if (!Strings.isNullOrEmpty(plugin)) {
result.put(String.format("/env/agent/conf/%s/agent.yaml", plugin),
CONFIG_PATH_IN_CONTAINER + "agent/conf/agent.yaml");
diff --git
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/ShardingSphereProxyContainer.java
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/ShardingSphereProxyContainer.java
index 5730f6f7757..aaecb04354a 100644
---
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/ShardingSphereProxyContainer.java
+++
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/container/ShardingSphereProxyContainer.java
@@ -71,7 +71,7 @@ public final class ShardingSphereProxyContainer extends
DockerITContainer {
}
private Map<String, String> createResourceMappingForProxy() {
- Map<String, String> result = new HashMap<>();
+ Map<String, String> result = new HashMap<>(3, 1F);
result.put("/env/proxy/conf/global.yaml",
ProxyContainerConstants.CONFIG_PATH_IN_CONTAINER + "global.yaml");
result.put("/env/proxy/conf/database-db.yaml",
ProxyContainerConstants.CONFIG_PATH_IN_CONTAINER + "database-db.yaml");
if (!Strings.isNullOrEmpty(plugin)) {
diff --git
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/env/E2ETestEnvironment.java
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/env/E2ETestEnvironment.java
index 1192ff4ecfe..6c1840bf064 100644
---
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/env/E2ETestEnvironment.java
+++
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/env/E2ETestEnvironment.java
@@ -136,8 +136,8 @@ public final class E2ETestEnvironment {
createJDBCEnvironment();
}
log.info("Waiting to collect data ...");
- if (0 < collectDataWaitSeconds) {
-
Awaitility.await().ignoreExceptions().atMost(Duration.ofSeconds(collectDataWaitSeconds
+ 1)).pollDelay(collectDataWaitSeconds, TimeUnit.SECONDS).until(() -> true);
+ if (0L < collectDataWaitSeconds) {
+
Awaitility.await().ignoreExceptions().atMost(Duration.ofSeconds(collectDataWaitSeconds
+ 1L)).pollDelay(collectDataWaitSeconds, TimeUnit.SECONDS).until(() -> true);
}
initialized = true;
}
diff --git
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/request/ProxyRequestExecutor.java
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/request/ProxyRequestExecutor.java
index 93656cd6feb..47141a81f95 100644
---
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/request/ProxyRequestExecutor.java
+++
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/request/ProxyRequestExecutor.java
@@ -72,7 +72,7 @@ public final class ProxyRequestExecutor implements Runnable {
JDBCAgentTestUtils.insertOrder(orderEntity, connection);
results.add(orderEntity.getOrderId());
}
- OrderEntity orderEntity = new OrderEntity(1000, 1000, "ROLL_BACK");
+ OrderEntity orderEntity = new OrderEntity(1000L, 1000, "ROLL_BACK");
JDBCAgentTestUtils.insertOrderRollback(orderEntity, connection);
JDBCAgentTestUtils.updateOrderStatus(orderEntity, connection);
JDBCAgentTestUtils.selectAllOrders(connection);
diff --git
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/util/OkHttpUtils.java
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/util/OkHttpUtils.java
index 54ee478d4b6..293110fb5c6 100644
---
a/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/util/OkHttpUtils.java
+++
b/test/e2e/agent/plugins/common/src/test/java/org/apache/shardingsphere/test/e2e/agent/common/util/OkHttpUtils.java
@@ -39,9 +39,9 @@ public final class OkHttpUtils {
private OkHttpUtils() {
OkHttpClient.Builder builder = new OkHttpClient.Builder();
- builder.connectTimeout(10, TimeUnit.SECONDS);
- builder.readTimeout(10, TimeUnit.SECONDS);
- builder.writeTimeout(10, TimeUnit.SECONDS);
+ builder.connectTimeout(10L, TimeUnit.SECONDS);
+ builder.readTimeout(10L, TimeUnit.SECONDS);
+ builder.writeTimeout(10L, TimeUnit.SECONDS);
client = builder.build();
}
diff --git
a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/DockerStorageContainer.java
b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/DockerStorageContainer.java
index beb6b516f26..a2adcf16735 100644
---
a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/DockerStorageContainer.java
+++
b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/DockerStorageContainer.java
@@ -48,15 +48,13 @@ public abstract class DockerStorageContainer extends
DockerITContainer implement
private final DatabaseType databaseType;
- private final Map<String, DataSource> actualDataSourceMap;
+ private final Map<String, DataSource> actualDataSourceMap = new
LinkedHashMap<>();
- private final Map<String, DataSource> expectedDataSourceMap;
+ private final Map<String, DataSource> expectedDataSourceMap = new
LinkedHashMap<>();
protected DockerStorageContainer(final DatabaseType databaseType, final
String containerImage) {
super(databaseType.getType().toLowerCase(), containerImage);
this.databaseType = databaseType;
- actualDataSourceMap = new LinkedHashMap<>();
- expectedDataSourceMap = new LinkedHashMap<>();
}
@Override
diff --git
a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/config/StorageContainerConfiguration.java
b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/config/StorageContainerConfiguration.java
index 607dc887c03..436476ef9ac 100644
---
a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/config/StorageContainerConfiguration.java
+++
b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/config/StorageContainerConfiguration.java
@@ -46,7 +46,7 @@ public class StorageContainerConfiguration {
final Map<String, DatabaseType>
databaseTypes, final Map<String, DatabaseType> expectedDatabaseTypes) {
this.databaseTypes = databaseTypes;
this.expectedDatabaseTypes = expectedDatabaseTypes;
- this.scenario = null;
+ scenario = null;
this.containerCommand = containerCommand;
this.containerEnvironments = containerEnvironments;
this.mountedResources = mountedResources;
diff --git
a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/impl/OpenGaussContainer.java
b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/impl/OpenGaussContainer.java
index 9f5b37af172..3f732fc6848 100644
---
a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/impl/OpenGaussContainer.java
+++
b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/impl/OpenGaussContainer.java
@@ -58,7 +58,7 @@ public final class OpenGaussContainer extends
DockerStorageContainer {
mapResources(storageContainerConfig.getMountedResources());
withPrivilegedMode(true);
super.configure();
- withStartupTimeout(Duration.of(120, ChronoUnit.SECONDS));
+ withStartupTimeout(Duration.of(120L, ChronoUnit.SECONDS));
}
@Override
diff --git
a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/util/StorageContainerUtils.java
b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/util/StorageContainerUtils.java
index 647b2fa8f3f..b5b8be6d07b 100644
---
a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/util/StorageContainerUtils.java
+++
b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/util/StorageContainerUtils.java
@@ -62,7 +62,7 @@ public final class StorageContainerUtils {
result.setPassword(password);
result.setMaximumPoolSize(maximumPoolSize);
result.setTransactionIsolation("TRANSACTION_READ_COMMITTED");
- result.setLeakDetectionThreshold(10000);
+ result.setLeakDetectionThreshold(10000L);
return result;
}
}
diff --git
a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/scenario/authority/AuthorityEnvironment.java
b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/scenario/authority/AuthorityEnvironment.java
index 4a84c127eb7..75b6c1f502b 100644
---
a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/scenario/authority/AuthorityEnvironment.java
+++
b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/scenario/authority/AuthorityEnvironment.java
@@ -37,7 +37,7 @@ public final class AuthorityEnvironment {
* Get init SQLs of this database type.
*
* @param databaseType database type
- * @return init SQLs of this data base type
+ * @return init SQLs of this database type
*/
public Collection<String> getInitSQLs(final DatabaseType databaseType) {
Collection<String> result = new LinkedList<>();
diff --git
a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/scenario/database/DatabaseEnvironmentManager.java
b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/scenario/database/DatabaseEnvironmentManager.java
index a9f344ca690..01ad7f8d8b5 100644
---
a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/scenario/database/DatabaseEnvironmentManager.java
+++
b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/scenario/database/DatabaseEnvironmentManager.java
@@ -54,7 +54,7 @@ public final class DatabaseEnvironmentManager {
}
private static Map<String, DatabaseType> crateDatabaseTypes(final
Collection<String> datasourceNames, final DatabaseType defaultDatabaseType) {
- Map<String, DatabaseType> result = new LinkedHashMap<>();
+ Map<String, DatabaseType> result = new
LinkedHashMap<>(datasourceNames.size(), 1F);
for (String each : datasourceNames) {
List<String> items = Splitter.on(":").splitToList(each);
DatabaseType databaseType = items.size() > 1 ?
TypedSPILoader.getService(DatabaseType.class, items.get(1)) :
defaultDatabaseType;
diff --git
a/test/e2e/fixture/src/test/java/org/apache/shardingsphere/test/e2e/fixture/ITStandardShardingAlgorithmFixture.java
b/test/e2e/fixture/src/test/java/org/apache/shardingsphere/test/e2e/fixture/ITStandardShardingAlgorithmFixture.java
index 88892b9a046..2c802ce353e 100644
---
a/test/e2e/fixture/src/test/java/org/apache/shardingsphere/test/e2e/fixture/ITStandardShardingAlgorithmFixture.java
+++
b/test/e2e/fixture/src/test/java/org/apache/shardingsphere/test/e2e/fixture/ITStandardShardingAlgorithmFixture.java
@@ -44,7 +44,7 @@ public final class ITStandardShardingAlgorithmFixture
implements StandardShardin
int maxValue = shardingValue.getValueRange().hasUpperBound() ?
shardingValue.getValueRange().upperEndpoint() : Integer.MAX_VALUE;
long range =
BigInteger.valueOf(maxValue).subtract(BigInteger.valueOf(minValue)).longValue();
int begin = Math.abs(minValue) % 10;
- if (range > 9) {
+ if (range > 9L) {
return availableTargetNames;
}
for (int i = begin; i <= range; i += 1) {
diff --git
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/PipelineContainerComposer.java
b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/PipelineContainerComposer.java
index defd2d5bfef..5d5ca34916f 100644
---
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/PipelineContainerComposer.java
+++
b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/PipelineContainerComposer.java
@@ -245,7 +245,7 @@ public final class PipelineContainerComposer implements
AutoCloseable {
.replace("${url}", getActualJdbcUrlTemplate(storageUnitName,
true));
proxyExecuteWithLog(registerStorageUnitTemplate, 0);
int timeout = databaseType instanceof OpenGaussDatabaseType ? 60 : 10;
- Awaitility.await().ignoreExceptions().atMost(timeout,
TimeUnit.SECONDS).pollInterval(3, TimeUnit.SECONDS).until(() ->
showStorageUnitsName().contains(storageUnitName));
+ Awaitility.await().ignoreExceptions().atMost(timeout,
TimeUnit.SECONDS).pollInterval(3L, TimeUnit.SECONDS).until(() ->
showStorageUnitsName().contains(storageUnitName));
}
/**
@@ -473,11 +473,11 @@ public final class PipelineContainerComposer implements
AutoCloseable {
*/
public List<Map<String, Object>> transformResultSetToList(final ResultSet
resultSet) throws SQLException {
ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
- int columns = resultSetMetaData.getColumnCount();
+ int columnCount = resultSetMetaData.getColumnCount();
List<Map<String, Object>> result = new ArrayList<>();
while (resultSet.next()) {
- Map<String, Object> row = new HashMap<>();
- for (int i = 1; i <= columns; i++) {
+ Map<String, Object> row = new HashMap<>(columnCount, 1F);
+ for (int i = 1; i <= columnCount; i++) {
row.put(resultSetMetaData.getColumnLabel(i).toLowerCase(),
resultSet.getObject(i));
}
result.add(row);
@@ -506,7 +506,7 @@ public final class PipelineContainerComposer implements
AutoCloseable {
for (int i = 0; i < 10; i++) {
List<Map<String, Object>> listJobStatus =
queryForListWithLog(distSQL);
log.info("show status result: {}", listJobStatus);
- Set<String> actualStatus = new HashSet<>();
+ Set<String> actualStatus = new HashSet<>(listJobStatus.size(), 1F);
Collection<Integer> incrementalIdleSecondsList = new
LinkedList<>();
for (Map<String, Object> each : listJobStatus) {
assertTrue(Strings.isNullOrEmpty((String)
each.get("error_message")), "error_message: `" + each.get("error_message") +
"`");
diff --git
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/cdc/DataSourceRecordConsumer.java
b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/cdc/DataSourceRecordConsumer.java
index eab65bb2ce8..f7a43258d83 100644
---
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/cdc/DataSourceRecordConsumer.java
+++
b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/cdc/DataSourceRecordConsumer.java
@@ -53,13 +53,12 @@ public final class DataSourceRecordConsumer implements
Consumer<List<Record>> {
private final DataSource dataSource;
- private final Map<String, PipelineTableMetaData> tableMetaDataMap;
-
private final StandardPipelineTableMetaDataLoader loader;
+ private final Map<String, PipelineTableMetaData> tableMetaDataMap = new
ConcurrentHashMap<>();
+
public DataSourceRecordConsumer(final DataSource dataSource, final
DatabaseType databaseType) {
this.dataSource = dataSource;
- tableMetaDataMap = new ConcurrentHashMap<>();
loader = new StandardPipelineTableMetaDataLoader(new
PipelineDataSourceWrapper(dataSource, databaseType));
}
@@ -79,7 +78,7 @@ public final class DataSourceRecordConsumer implements
Consumer<List<Record>> {
private void processRecords(final List<Record> records, final Connection
connection) throws SQLException {
long insertCount = records.stream().filter(each ->
DataChangeType.INSERT == each.getDataChangeType()).count();
if (insertCount == records.size()) {
- Map<String, List<Record>> recordsMap = new HashMap<>();
+ Map<String, List<Record>> recordsMap = new
HashMap<>(records.size(), 1F);
for (Record each : records) {
String key =
buildTableNameWithSchema(each.getMetaData().getTable(),
each.getMetaData().getSchema());
recordsMap.computeIfAbsent(key, ignored -> new
LinkedList<>()).add(each);
@@ -182,7 +181,7 @@ public final class DataSourceRecordConsumer implements
Consumer<List<Record>> {
case DELETE:
return SQLBuilderUtils.buildDeleteSQL(tableName, "order_id");
default:
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("");
}
}
diff --git
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLMigrationGeneralE2EIT.java
b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLMigrationGeneralE2EIT.java
index c0b5f397434..99c2acc6ede 100644
---
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLMigrationGeneralE2EIT.java
+++
b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/MySQLMigrationGeneralE2EIT.java
@@ -82,7 +82,7 @@ class MySQLMigrationGeneralE2EIT extends
AbstractMigrationE2EIT {
containerComposer.waitJobPrepareSuccess(String.format("SHOW
MIGRATION STATUS '%s'", orderJobId));
containerComposer.startIncrementTask(
new
E2EIncrementalTask(containerComposer.getSourceDataSource(), SOURCE_TABLE_NAME,
new SnowflakeKeyGenerateAlgorithm(), containerComposer.getDatabaseType(), 30));
-
TimeUnit.SECONDS.timedJoin(containerComposer.getIncreaseTaskThread(), 30);
+
TimeUnit.SECONDS.timedJoin(containerComposer.getIncreaseTaskThread(), 30L);
containerComposer.sourceExecuteWithLog(String.format("INSERT INTO
%s (order_id, user_id, status) VALUES (10000, 1, 'OK')", SOURCE_TABLE_NAME));
containerComposer.sourceExecuteWithLog("INSERT INTO t_order_item
(item_id, order_id, user_id, status) VALUES (10000, 10000, 1, 'OK')");
stopMigrationByJobId(containerComposer, orderJobId);
diff --git
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLMigrationGeneralE2EIT.java
b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLMigrationGeneralE2EIT.java
index 0b9cf90772a..1dd4a33fc4c 100644
---
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLMigrationGeneralE2EIT.java
+++
b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLMigrationGeneralE2EIT.java
@@ -90,7 +90,7 @@ class PostgreSQLMigrationGeneralE2EIT extends
AbstractMigrationE2EIT {
String schemaTableName = String.join(".",
PipelineContainerComposer.SCHEMA_NAME, SOURCE_TABLE_NAME);
containerComposer.startIncrementTask(new
E2EIncrementalTask(containerComposer.getSourceDataSource(), schemaTableName,
new SnowflakeKeyGenerateAlgorithm(),
containerComposer.getDatabaseType(), 20));
-
TimeUnit.SECONDS.timedJoin(containerComposer.getIncreaseTaskThread(), 30);
+
TimeUnit.SECONDS.timedJoin(containerComposer.getIncreaseTaskThread(), 30L);
containerComposer.sourceExecuteWithLog(String.format("INSERT INTO
%s (order_id, user_id, status) VALUES (10000, 1, 'OK')", schemaTableName));
DataSource jdbcDataSource =
containerComposer.generateShardingSphereDataSourceFromProxy();
containerComposer.assertOrderRecordExist(jdbcDataSource,
schemaTableName, 10000);
diff --git
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLToMySQLMigrationE2EIT.java
b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLToMySQLMigrationE2EIT.java
index 6b124a232b8..a187e1de41d 100644
---
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLToMySQLMigrationE2EIT.java
+++
b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/migration/general/PostgreSQLToMySQLMigrationE2EIT.java
@@ -75,7 +75,7 @@ class PostgreSQLToMySQLMigrationE2EIT extends
AbstractMigrationE2EIT {
+ "KEY_GENERATE_STRATEGY(COLUMN=order_id,
TYPE(NAME='snowflake')))", 2);
initTargetTable(containerComposer);
containerComposer.proxyExecuteWithLog("MIGRATE TABLE
source_ds.t_order INTO t_order", 2);
- Awaitility.await().ignoreExceptions().atMost(10,
TimeUnit.SECONDS).pollInterval(1, TimeUnit.SECONDS).until(() ->
!listJobId(containerComposer).isEmpty());
+ Awaitility.await().ignoreExceptions().atMost(10L,
TimeUnit.SECONDS).pollInterval(1L, TimeUnit.SECONDS).until(() ->
!listJobId(containerComposer).isEmpty());
String jobId = listJobId(containerComposer).get(0);
containerComposer.waitJobStatusReached(String.format("SHOW
MIGRATION STATUS %s", jobId), JobStatus.EXECUTE_INCREMENTAL_TASK, 15);
try (Connection connection = DriverManager.getConnection(jdbcUrl,
"postgres", "postgres")) {
diff --git
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/E2EIncrementalTask.java
b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/E2EIncrementalTask.java
index a5d33253036..340f276e369 100644
---
a/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/E2EIncrementalTask.java
+++
b/test/e2e/operation/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/task/E2EIncrementalTask.java
@@ -106,7 +106,7 @@ public final class E2EIncrementalTask implements Runnable {
} else if (databaseType instanceof OpenGaussDatabaseType) {
sql = SQLBuilderUtils.buildInsertSQL(OPENGAUSS_COLUMN_NAMES,
orderTableName);
} else {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("");
}
DataSourceExecuteUtils.execute(dataSource, sql, orderInsertData);
}
@@ -124,7 +124,7 @@ public final class E2EIncrementalTask implements Runnable {
deleteOrderById(orderId);
break;
default:
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException("");
}
}
}
diff --git
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/cases/commitrollback/MultiJDBCConnectionsTestCase.java
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/cases/commitrollback/MultiJDBCConnectionsTestCase.java
index 7c01352f523..d6639df228b 100644
---
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/cases/commitrollback/MultiJDBCConnectionsTestCase.java
+++
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/cases/commitrollback/MultiJDBCConnectionsTestCase.java
@@ -42,8 +42,8 @@ public final class MultiJDBCConnectionsTestCase extends
BaseTransactionTestCase
try (Connection connection = getDataSource().getConnection()) {
PreparedStatement statement = connection.prepareStatement("insert
into account(id, balance, transaction_id) values(?, ?, ?)");
connection.setAutoCommit(false);
- statement.setLong(1, 1);
- statement.setFloat(2, 1);
+ statement.setLong(1, 1L);
+ statement.setFloat(2, 1F);
statement.setInt(3, 1);
statement.execute();
try (Connection connection2 = getDataSource().getConnection()) {
diff --git
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/cases/cursor/OpenGaussCursorTestCase.java
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/cases/cursor/OpenGaussCursorTestCase.java
index 40165293495..8fc07a05ed0 100644
---
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/cases/cursor/OpenGaussCursorTestCase.java
+++
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/cases/cursor/OpenGaussCursorTestCase.java
@@ -44,7 +44,7 @@ public final class OpenGaussCursorTestCase extends
BaseTransactionTestCase {
public OpenGaussCursorTestCase(final TransactionTestCaseParameter
testCaseParam) {
super(testCaseParam);
- this.cursorSQLCommand = loadCursorSQLCommand();
+ cursorSQLCommand = loadCursorSQLCommand();
}
private CursorSQLCommand loadCursorSQLCommand() {
diff --git
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/engine/base/TransactionBaseE2EIT.java
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/engine/base/TransactionBaseE2EIT.java
index 2e924c3b924..8f1441df760 100644
---
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/engine/base/TransactionBaseE2EIT.java
+++
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/engine/base/TransactionBaseE2EIT.java
@@ -109,11 +109,11 @@ public abstract class TransactionBaseE2EIT {
private void callTestCases(final TransactionTestParameter testParam, final
TransactionContainerComposer containerComposer) throws SQLException {
if
(AdapterType.PROXY.getValue().equalsIgnoreCase(testParam.getAdapter())) {
for (TransactionType each : testParam.getTransactionTypes()) {
- if (TransactionType.LOCAL.equals(each)) {
+ if (TransactionType.LOCAL == each) {
log.info("Call transaction IT {}, alter transaction rule
{}.", testParam, "");
alterTransactionRule(each, "", containerComposer);
doCallTestCases(testParam, each, "", containerComposer);
- } else if (TransactionType.XA.equals(each)) {
+ } else if (TransactionType.XA == each) {
for (String eachProvider : testParam.getProviders()) {
log.info("Call transaction IT {}, alter transaction
rule {}.", testParam, eachProvider);
alterTransactionRule(each, eachProvider,
containerComposer);
@@ -135,9 +135,9 @@ public abstract class TransactionBaseE2EIT {
}
private void alterTransactionRule(final TransactionType transactionType,
final String providerType, final TransactionContainerComposer
containerComposer) throws SQLException {
- if (Objects.equals(transactionType, TransactionType.LOCAL)) {
+ if (transactionType == TransactionType.LOCAL) {
alterLocalTransactionRule(containerComposer);
- } else if (Objects.equals(transactionType, TransactionType.XA)) {
+ } else if (transactionType == TransactionType.XA) {
alterXaTransactionRule(providerType, containerComposer);
}
}
@@ -415,11 +415,11 @@ public abstract class TransactionBaseE2EIT {
private void setTestParameters(final Map<String,
TransactionTestParameter> testParams, final TransactionTestCaseRegistry
registry, final String databaseVersion,
final TransactionType transactionType,
final String scenario, final Class<? extends BaseTransactionTestCase>
caseClass) {
- if (TransactionType.LOCAL.equals(transactionType)) {
+ if (TransactionType.LOCAL == transactionType) {
setTestParameters(testParams, registry, databaseVersion,
Collections.singletonList(transactionType), Collections.singletonList(""),
scenario, caseClass);
return;
}
- if (TransactionType.XA.equals(transactionType)) {
+ if (TransactionType.XA == transactionType) {
for (String each : ENV.getAllowXAProviders().isEmpty() ?
ALL_XA_PROVIDERS : ENV.getAllowXAProviders()) {
setTestParameters(testParams, registry, databaseVersion,
Collections.singletonList(transactionType), Collections.singletonList(each),
scenario, caseClass);
}
diff --git
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/engine/base/TransactionTestCase.java
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/engine/base/TransactionTestCase.java
index b213564f7ed..65ed8e0ae8e 100644
---
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/engine/base/TransactionTestCase.java
+++
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/engine/base/TransactionTestCase.java
@@ -28,7 +28,7 @@ import java.lang.annotation.Target;
* It represents a class to be tested for transaction integration.
*/
@Target(ElementType.TYPE)
-@Retention(value = RetentionPolicy.RUNTIME)
+@Retention(RetentionPolicy.RUNTIME)
public @interface TransactionTestCase {
/**
diff --git
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/env/TransactionE2EEnvironment.java
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/env/TransactionE2EEnvironment.java
index 6df21b9757e..483c1bdd4e0 100644
---
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/env/TransactionE2EEnvironment.java
+++
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/env/TransactionE2EEnvironment.java
@@ -76,7 +76,7 @@ public final class TransactionE2EEnvironment {
}
private Map<String, TransactionTestCaseRegistry>
initTransactionTestCaseRegistryMap() {
- Map<String, TransactionTestCaseRegistry> result = new
HashMap<>(TransactionTestCaseRegistry.values().length, 1);
+ Map<String, TransactionTestCaseRegistry> result = new
HashMap<>(TransactionTestCaseRegistry.values().length, 1F);
for (TransactionTestCaseRegistry each :
TransactionTestCaseRegistry.values()) {
result.put(each.getTestCaseClass().getName(), each);
}
diff --git
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/compose/BaseContainerComposer.java
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/compose/BaseContainerComposer.java
index b98eac6adfc..7cc3b4c130a 100644
---
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/compose/BaseContainerComposer.java
+++
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/compose/BaseContainerComposer.java
@@ -27,7 +27,7 @@ public abstract class BaseContainerComposer implements
Startable {
private final ITContainers containers;
protected BaseContainerComposer(final String scenario) {
- this.containers = new ITContainers(scenario);
+ containers = new ITContainers(scenario);
}
@Override
diff --git
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/compose/DockerContainerComposer.java
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/compose/DockerContainerComposer.java
index 683e9759acf..bbf1a841d66 100644
---
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/compose/DockerContainerComposer.java
+++
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/compose/DockerContainerComposer.java
@@ -56,7 +56,7 @@ public final class DockerContainerComposer extends
BaseContainerComposer {
public DockerContainerComposer(final TransactionTestParameter testParam) {
super(testParam.getScenario());
- this.databaseType = testParam.getDatabaseType();
+ databaseType = testParam.getDatabaseType();
governanceContainer = getContainers().registerContainer(new
ZookeeperContainer());
storageContainer =
getContainers().registerContainer((DockerStorageContainer)
StorageContainerFactory.newInstance(databaseType,
testParam.getStorageContainerImage(),
StorageContainerConfigurationFactory.newInstance(databaseType,
testParam.getScenario())));
diff --git
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/config/mysql/MySQLContainerConfigurationFactory.java
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/config/mysql/MySQLContainerConfigurationFactory.java
index adfc0f56eed..aca46ec0f7c 100644
---
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/config/mysql/MySQLContainerConfigurationFactory.java
+++
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/framework/container/config/mysql/MySQLContainerConfigurationFactory.java
@@ -61,7 +61,7 @@ public final class MySQLContainerConfigurationFactory {
}
private static Map<String, String> getMountedResources(final String
scenario) {
- Map<String, String> result = new HashMap<>();
+ Map<String, String> result = new HashMap<>(3, 1F);
result.put(new
ScenarioDataPath(scenario).getInitSQLResourcePath(Type.ACTUAL,
TypedSPILoader.getService(DatabaseType.class, "MySQL")) + "/01-actual-init.sql",
"/docker-entrypoint-initdb.d/01-actual-init.sql");
result.put(new
ScenarioDataPath(scenario).getInitSQLResourcePath(Type.EXPECTED,
TypedSPILoader.getService(DatabaseType.class, "MySQL")) +
"/01-expected-init.sql",
diff --git
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/util/TestCaseClassScanner.java
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/util/TestCaseClassScanner.java
index 060256c773a..6c05dd8a24c 100644
---
a/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/util/TestCaseClassScanner.java
+++
b/test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/util/TestCaseClassScanner.java
@@ -108,8 +108,8 @@ public final class TestCaseClassScanner {
private static void scanClassFiles(final File file) {
if (file.isDirectory()) {
- for (File f : Objects.requireNonNull(file.listFiles())) {
- scanClassFiles(f);
+ for (File each : Objects.requireNonNull(file.listFiles())) {
+ scanClassFiles(each);
}
} else {
if (file.getName().endsWith(CLASS_SUFFIX)) {
diff --git
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/AdditionalDQLE2EIT.java
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/AdditionalDQLE2EIT.java
index a3b61f0c17e..c80dda628f2 100644
---
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/AdditionalDQLE2EIT.java
+++
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/AdditionalDQLE2EIT.java
@@ -53,7 +53,7 @@ class AdditionalDQLE2EIT extends BaseDQLE2EIT {
}
SingleE2EContainerComposer containerComposer = new
SingleE2EContainerComposer(testParam);
init(testParam, containerComposer);
- // TODO fix e2e test blocked exception with PostgreSQL or openGuass in
#23643
+ // TODO fix e2e test blocked exception with PostgreSQL or openGauss in
#23643
if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType())) {
return;
}
@@ -74,7 +74,7 @@ class AdditionalDQLE2EIT extends BaseDQLE2EIT {
}
SingleE2EContainerComposer containerComposer = new
SingleE2EContainerComposer(testParam);
init(testParam, containerComposer);
- // TODO fix e2e test blocked exception with PostgreSQL or openGuass in
#23643
+ // TODO fix e2e test blocked exception with PostgreSQL or openGauss in
#23643
if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType())) {
return;
}
@@ -95,7 +95,7 @@ class AdditionalDQLE2EIT extends BaseDQLE2EIT {
}
SingleE2EContainerComposer containerComposer = new
SingleE2EContainerComposer(testParam);
init(testParam, containerComposer);
- // TODO fix e2e test blocked exception with PostgreSQL or openGuass in
#23643
+ // TODO fix e2e test blocked exception with PostgreSQL or openGauss in
#23643
if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType())) {
return;
}
@@ -116,7 +116,7 @@ class AdditionalDQLE2EIT extends BaseDQLE2EIT {
}
SingleE2EContainerComposer containerComposer = new
SingleE2EContainerComposer(testParam);
init(testParam, containerComposer);
- // TODO fix e2e test blocked exception with PostgreSQL or openGuass in
#23643
+ // TODO fix e2e test blocked exception with PostgreSQL or openGauss in
#23643
if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType())) {
return;
}
diff --git
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/GeneralDQLE2EIT.java
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/GeneralDQLE2EIT.java
index 0f05d683f3a..fd82de46992 100644
---
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/GeneralDQLE2EIT.java
+++
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/GeneralDQLE2EIT.java
@@ -56,7 +56,7 @@ class GeneralDQLE2EIT extends BaseDQLE2EIT {
SingleE2EContainerComposer containerComposer = new
SingleE2EContainerComposer(testParam);
init(testParam, containerComposer);
if (null !=
testParam.getTestCaseContext().getTestCase().getDelayAssertionSeconds()) {
-
Awaitility.await().atMost(Duration.ofMinutes(5)).pollDelay(testParam.getTestCaseContext().getTestCase().getDelayAssertionSeconds(),
TimeUnit.SECONDS).until(() -> true);
+
Awaitility.await().atMost(Duration.ofMinutes(5L)).pollDelay(testParam.getTestCaseContext().getTestCase().getDelayAssertionSeconds(),
TimeUnit.SECONDS).until(() -> true);
}
if (isUseXMLAsExpectedDataset()) {
assertExecuteQueryWithXmlExpected(testParam, containerComposer);
@@ -130,7 +130,7 @@ class GeneralDQLE2EIT extends BaseDQLE2EIT {
SingleE2EContainerComposer containerComposer = new
SingleE2EContainerComposer(testParam);
init(testParam, containerComposer);
if (null !=
testParam.getTestCaseContext().getTestCase().getDelayAssertionSeconds()) {
-
Awaitility.await().atMost(Duration.ofMinutes(5)).pollDelay(testParam.getTestCaseContext().getTestCase().getDelayAssertionSeconds(),
TimeUnit.SECONDS).until(() -> true);
+
Awaitility.await().atMost(Duration.ofMinutes(5L)).pollDelay(testParam.getTestCaseContext().getTestCase().getDelayAssertionSeconds(),
TimeUnit.SECONDS).until(() -> true);
}
if (isUseXMLAsExpectedDataset()) {
assertExecuteWithXmlExpected(testParam, containerComposer);
diff --git
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/expression/ExpressionAssert.java
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/expression/ExpressionAssert.java
index a14446633e6..df1385e2931 100644
---
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/expression/ExpressionAssert.java
+++
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/expression/ExpressionAssert.java
@@ -342,7 +342,7 @@ public final class ExpressionAssert {
Iterator<ExpectedExpression> expectedIterator =
expected.getParameters().iterator();
Iterator<ExpressionSegment> actualIterator =
actual.getParameters().iterator();
while (expectedIterator.hasNext()) {
- ExpressionAssert.assertExpression(assertContext,
actualIterator.next(), expectedIterator.next());
+ assertExpression(assertContext, actualIterator.next(),
expectedIterator.next());
}
if (null != expected.getOwner()) {
OwnerAssert.assertIs(assertContext, actual.getOwner(),
expected.getOwner());
@@ -583,7 +583,7 @@ public final class ExpressionAssert {
Iterator<ExpectedExpression> expectedIterator =
expected.getParameters().iterator();
Iterator<ExpressionSegment> actualIterator =
actual.getParameters().iterator();
while (expectedIterator.hasNext()) {
- ExpressionAssert.assertExpression(assertContext,
actualIterator.next(), expectedIterator.next());
+ assertExpression(assertContext, actualIterator.next(),
expectedIterator.next());
}
}
diff --git
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/hint/WithTableHintClauseAssert.java
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/hint/WithTableHintClauseAssert.java
index 997b8473fe1..54d9201b6ec 100644
---
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/hint/WithTableHintClauseAssert.java
+++
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/hint/WithTableHintClauseAssert.java
@@ -25,7 +25,7 @@ import
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.SQLCaseAsse
import
org.apache.shardingsphere.test.it.sql.parser.internal.asserts.segment.SQLSegmentAssert;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.hint.ExpectedTableHint;
import
org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.hint.ExpectedWithTableHintClause;
-import org.hamcrest.CoreMatchers;
+
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -46,7 +46,7 @@ public final class WithTableHintClauseAssert {
*/
public static void assertIs(final SQLCaseAssertContext assertContext,
final WithTableHintSegment actual, final ExpectedWithTableHintClause expected) {
if (null == expected.getTableHint()) {
- assertThat(assertContext.getText("with table hint clause
assertion error: "), actual.getTableHintLimitedSegments().size(),
CoreMatchers.is(expected.getTableHint().size()));
+ assertThat(assertContext.getText("with table hint clause
assertion error: "), actual.getTableHintLimitedSegments().size(),
is(expected.getTableHint().size()));
} else {
int count = 0;
for (TableHintLimitedSegment each :
actual.getTableHintLimitedSegments()) {
diff --git
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/insert/InsertExecClauseAssert.java
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/insert/InsertExecClauseAssert.java
index 940bacbe85f..9b22330616e 100644
---
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/insert/InsertExecClauseAssert.java
+++
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/insert/InsertExecClauseAssert.java
@@ -36,7 +36,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
* Insert execute clause assert.
**/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public class InsertExecClauseAssert {
+public final class InsertExecClauseAssert {
/**
* Assert actual execute segment is correct with expected execute clause.
diff --git
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/owner/OwnerAssert.java
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/owner/OwnerAssert.java
index 4b3ff9baf27..a9491f46de2 100644
---
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/owner/OwnerAssert.java
+++
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/segment/owner/OwnerAssert.java
@@ -48,7 +48,7 @@ public final class OwnerAssert {
assertFalse(actual.getOwner().isPresent(),
assertContext.getText("Actual owner should not exist."));
} else {
assertTrue(actual.getOwner().isPresent(),
assertContext.getText("Actual owner should exist."));
- OwnerAssert.assertIs(assertContext, actual.getOwner().get(),
expected.getOwner());
+ assertIs(assertContext, actual.getOwner().get(),
expected.getOwner());
}
}
}
diff --git
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ral/impl/pipeline/AlterTransmissionRuleStatementAssert.java
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ral/impl/pipeline/AlterTransmissionRuleStatementAssert.java
index 4de7e97bee7..0e37c663534 100644
---
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ral/impl/pipeline/AlterTransmissionRuleStatementAssert.java
+++
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/ral/impl/pipeline/AlterTransmissionRuleStatementAssert.java
@@ -37,7 +37,7 @@ import static org.junit.jupiter.api.Assertions.assertNull;
* Alter transmission rule statement assert.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public class AlterTransmissionRuleStatementAssert {
+public final class AlterTransmissionRuleStatementAssert {
/**
* Assert statement is correct with expected parser result.
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/common/metadata/loader/StandardPipelineTableMetaDataLoaderTest.java
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/common/metadata/loader/StandardPipelineTableMetaDataLoaderTest.java
index 876019a8d91..cae26d5244d 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/common/metadata/loader/StandardPipelineTableMetaDataLoaderTest.java
+++
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/common/metadata/loader/StandardPipelineTableMetaDataLoaderTest.java
@@ -56,8 +56,8 @@ class StandardPipelineTableMetaDataLoaderTest {
result.setPassword("root");
result.setMaximumPoolSize(10);
result.setMinimumIdle(2);
- result.setConnectionTimeout(15 * 1000L);
- result.setIdleTimeout(40 * 1000L);
+ result.setConnectionTimeout(15L * 1000L);
+ result.setIdleTimeout(40L * 1000L);
return result;
}
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/consistencycheck/table/calculator/RecordSingleTableInventoryCalculatorTest.java
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/consistencycheck/table/calculator/RecordSingleTableInventoryCalculatorTest.java
index 027fad9e991..b57af6a326b 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/consistencycheck/table/calculator/RecordSingleTableInventoryCalculatorTest.java
+++
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/consistencycheck/table/calculator/RecordSingleTableInventoryCalculatorTest.java
@@ -65,8 +65,8 @@ class RecordSingleTableInventoryCalculatorTest {
result.setPassword("root");
result.setMaximumPoolSize(10);
result.setMinimumIdle(2);
- result.setConnectionTimeout(15 * 1000);
- result.setIdleTimeout(40 * 1000);
+ result.setConnectionTimeout(15L * 1000L);
+ result.setIdleTimeout(40L * 1000L);
return result;
}
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/EmbedTestingServer.java
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/EmbedTestingServer.java
index f8149eeb544..7349f235dec 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/EmbedTestingServer.java
+++
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/EmbedTestingServer.java
@@ -69,10 +69,10 @@ public final class EmbedTestingServer {
// CHECKSTYLE:OFF
} catch (final Exception ex) {
// CHECKSTYLE:ON
- if (!isIgnoredException(ex)) {
- throw new RuntimeException(ex);
- } else {
+ if (isIgnoredException(ex)) {
log.warn("Start embed zookeeper server got exception: {}",
ex.getMessage());
+ } else {
+ throw new RuntimeException(ex);
}
} finally {
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/algorithm/FixtureTransmissionJobItemContext.java
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/algorithm/FixtureTransmissionJobItemContext.java
index 23ed37f9ec1..bea381310b3 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/algorithm/FixtureTransmissionJobItemContext.java
+++
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/fixture/algorithm/FixtureTransmissionJobItemContext.java
@@ -67,7 +67,7 @@ public final class FixtureTransmissionJobItemContext
implements TransmissionJobI
@Override
public long getProcessedRecordsCount() {
- return 0;
+ return 0L;
}
@Override
@@ -76,7 +76,7 @@ public final class FixtureTransmissionJobItemContext
implements TransmissionJobI
@Override
public long getInventoryRecordsCount() {
- return 0;
+ return 0L;
}
@Override
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/registrycenter/repository/PipelineGovernanceFacadeTest.java
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/registrycenter/repository/PipelineGovernanceFacadeTest.java
index b7c263eef31..c53465661d1 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/registrycenter/repository/PipelineGovernanceFacadeTest.java
+++
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/registrycenter/repository/PipelineGovernanceFacadeTest.java
@@ -89,7 +89,7 @@ class PipelineGovernanceFacadeTest {
void assertWatch() throws InterruptedException {
String key = PipelineNodePath.DATA_PIPELINE_ROOT + "/1";
getClusterPersistRepository().persist(key, "");
- boolean awaitResult = COUNT_DOWN_LATCH.await(10, TimeUnit.SECONDS);
+ boolean awaitResult = COUNT_DOWN_LATCH.await(10L, TimeUnit.SECONDS);
assertTrue(awaitResult);
DataChangedEvent event = EVENT_ATOMIC_REFERENCE.get();
assertNotNull(event);
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/task/IncrementalTaskTest.java
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/task/IncrementalTaskTest.java
index 97199882f40..dff879eb38d 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/task/IncrementalTaskTest.java
+++
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/task/IncrementalTaskTest.java
@@ -67,7 +67,7 @@ class IncrementalTaskTest {
@Test
@Disabled("H2 doesn't support incremental")
void assertStart() throws ExecutionException, InterruptedException,
TimeoutException {
- CompletableFuture.allOf(incrementalTask.start().toArray(new
CompletableFuture[0])).get(10, TimeUnit.SECONDS);
+ CompletableFuture.allOf(incrementalTask.start().toArray(new
CompletableFuture[0])).get(10L, TimeUnit.SECONDS);
assertThat(incrementalTask.getTaskId(), is("ds_0"));
assertThat(incrementalTask.getTaskProgress().getPosition(),
instanceOf(IngestPlaceholderPosition.class));
}
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/task/InventoryTaskTest.java
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/task/InventoryTaskTest.java
index 582e39ae3de..a2c28dc9134 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/task/InventoryTaskTest.java
+++
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/task/InventoryTaskTest.java
@@ -101,8 +101,9 @@ class InventoryTaskTest {
result.setLogicTableName(logicTableName);
result.setActualTableName(actualTableName);
result.setUniqueKeyColumns(Collections.singletonList(PipelineContextUtils.mockOrderIdColumnMetaData()));
- result.getCommonContext().setPosition(
- null ==
taskConfig.getDumperContext().getCommonContext().getPosition() ? new
IntegerPrimaryKeyIngestPosition(0, 1000) :
taskConfig.getDumperContext().getCommonContext().getPosition());
+ result.getCommonContext().setPosition(null ==
taskConfig.getDumperContext().getCommonContext().getPosition()
+ ? new IntegerPrimaryKeyIngestPosition(0L, 1000L)
+ :
taskConfig.getDumperContext().getCommonContext().getPosition());
return result;
}
}
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/PipelineDistributedBarrierTest.java
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/PipelineDistributedBarrierTest.java
index b4e15b29791..385bfca89c8 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/PipelineDistributedBarrierTest.java
+++
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/core/util/PipelineDistributedBarrierTest.java
@@ -66,10 +66,10 @@ class PipelineDistributedBarrierTest {
String barrierEnablePath =
PipelineMetaDataNode.getJobBarrierEnablePath(jobId);
instance.register(barrierEnablePath, 1);
instance.persistEphemeralChildrenNode(barrierEnablePath, 1);
- boolean actual = instance.await(barrierEnablePath, 1,
TimeUnit.SECONDS);
+ boolean actual = instance.await(barrierEnablePath, 1L,
TimeUnit.SECONDS);
assertFalse(actual);
instance.notifyChildrenNodeCountCheck(barrierEnablePath + "/0");
- actual = instance.await(barrierEnablePath, 1, TimeUnit.SECONDS);
+ actual = instance.await(barrierEnablePath, 1L, TimeUnit.SECONDS);
assertTrue(actual);
}
}
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/migration/api/impl/MigrationJobAPITest.java
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/migration/api/impl/MigrationJobAPITest.java
index 362556cac2b..5c807362a7f 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/migration/api/impl/MigrationJobAPITest.java
+++
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/migration/api/impl/MigrationJobAPITest.java
@@ -331,8 +331,8 @@ class MigrationJobAPITest {
YamlTransmissionJobItemProgress yamlJobItemProgress = new
YamlTransmissionJobItemProgress();
yamlJobItemProgress.setSourceDatabaseType("MySQL");
yamlJobItemProgress.setStatus(JobStatus.EXECUTE_INCREMENTAL_TASK.name());
- yamlJobItemProgress.setProcessedRecordsCount(100);
- yamlJobItemProgress.setInventoryRecordsCount(50);
+ yamlJobItemProgress.setProcessedRecordsCount(100L);
+ yamlJobItemProgress.setInventoryRecordsCount(50L);
PipelineAPIFactory.getPipelineGovernanceFacade(PipelineContextUtils.getContextKey()).getJobItemFacade().getProcess().persist(jobConfig.getJobId(),
0, YamlEngine.marshal(yamlJobItemProgress));
Collection<TransmissionJobItemInfo> jobItemInfos =
transmissionJobManager.getJobItemInfos(jobConfig.getJobId());
TransmissionJobItemInfo jobItemInfo =
jobItemInfos.stream().iterator().next();
diff --git
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/migration/yaml/YamlMigrationJobConfigurationSwapperTest.java
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/migration/yaml/YamlMigrationJobConfigurationSwapperTest.java
index fa77e18dde8..290f64de39c 100644
---
a/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/migration/yaml/YamlMigrationJobConfigurationSwapperTest.java
+++
b/test/it/pipeline/src/test/java/org/apache/shardingsphere/test/it/data/pipeline/scenario/migration/yaml/YamlMigrationJobConfigurationSwapperTest.java
@@ -30,7 +30,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
class YamlMigrationJobConfigurationSwapperTest {
@Test
- void assertMarsharlUnmarshal() {
+ void assertMarshalUnmarshal() {
YamlMigrationJobConfiguration yamlJobConfig =
JobConfigurationBuilder.createYamlMigrationJobConfiguration();
YamlMigrationJobConfigurationSwapper swapper = new
YamlMigrationJobConfigurationSwapper();
MigrationJobConfiguration jobConfig =
swapper.swapToObject(yamlJobConfig);
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/commons/TestShardingService.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/commons/TestShardingService.java
index 420d449a5b4..c9ca62e18d7 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/commons/TestShardingService.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/commons/TestShardingService.java
@@ -30,6 +30,7 @@ import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Collections;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.LongStream;
@@ -76,11 +77,11 @@ public final class TestShardingService {
assertThat(orderItems.stream().map(OrderItem::getStatus).collect(Collectors.toList()),
equalTo(IntStream.range(1, 11).mapToObj(i ->
"INSERT_TEST").collect(Collectors.toList())));
assertThat(addressRepository.selectAll(),
- equalTo(LongStream.range(1, 11).mapToObj(i -> new Address(i,
"address_test_" + i)).collect(Collectors.toList())));
+ equalTo(LongStream.range(1L, 11L).mapToObj(each -> new
Address(each, "address_test_" + each)).collect(Collectors.toList())));
deleteData(orderIds);
- assertThat(orderRepository.selectAll(), equalTo(new ArrayList<>()));
- assertThat(orderItemRepository.selectAll(), equalTo(new
ArrayList<>()));
- assertThat(addressRepository.selectAll(), equalTo(new ArrayList<>()));
+ assertThat(orderRepository.selectAll(),
equalTo(Collections.emptyList()));
+ assertThat(orderItemRepository.selectAll(),
equalTo(Collections.emptyList()));
+ assertThat(addressRepository.selectAll(),
equalTo(Collections.emptyList()));
orderItemRepository.assertRollbackWithTransactions();
}
@@ -119,7 +120,7 @@ public final class TestShardingService {
* @throws SQLException An exception that provides information on a
database access error or other errors.
*/
public void deleteData(final Collection<Long> orderIds) throws
SQLException {
- long count = 1;
+ long count = 1L;
for (Long each : orderIds) {
orderRepository.delete(each);
orderItemRepository.delete(each);
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 289ebfe0097..491169fa155 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
@@ -69,7 +69,7 @@ class MySQLTest {
jdbcUrlPrefix = "jdbc:mysql://localhost:" +
container.getMappedPort(3306) + "/";
DataSource dataSource = createDataSource();
testShardingService = new TestShardingService(dataSource);
- this.initEnvironment();
+ initEnvironment();
testShardingService.processSuccess();
testShardingService.cleanEnvironment();
}
@@ -93,7 +93,7 @@ class MySQLTest {
@SuppressWarnings({"SqlDialectInspection", "SqlNoDataSourceInspection"})
private DataSource createDataSource() {
-
Awaitility.await().atMost(Duration.ofMinutes(1)).ignoreExceptionsMatching(e ->
e instanceof CommunicationsException)
+
Awaitility.await().atMost(Duration.ofMinutes(1L)).ignoreExceptionsMatching(e ->
e instanceof CommunicationsException)
.until(() -> {
openConnection().close();
return true;
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 ac0609fba46..edff542ce3e 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
@@ -63,7 +63,7 @@ class OpenGaussTest {
jdbcUrlPrefix = "jdbc:opengauss://localhost:" +
openGaussContainer.getMappedPort(5432) + "/";
DataSource dataSource = createDataSource();
testShardingService = new TestShardingService(dataSource);
- this.initEnvironment();
+ initEnvironment();
testShardingService.processSuccess();
testShardingService.cleanEnvironment();
}
@@ -87,7 +87,7 @@ class OpenGaussTest {
@SuppressWarnings({"SqlDialectInspection", "SqlNoDataSourceInspection"})
private DataSource createDataSource() {
-
Awaitility.await().atMost(Duration.ofMinutes(1)).ignoreExceptions().until(() ->
{
+
Awaitility.await().atMost(Duration.ofMinutes(1L)).ignoreExceptions().until(()
-> {
openConnection().close();
return true;
});
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 4860c4aea33..a9852c3ca31 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
@@ -38,7 +38,7 @@ class PostgresTest {
config.setJdbcUrl("jdbc:shardingsphere:classpath:test-native/yaml/databases/postgresql.yaml");
DataSource dataSource = new HikariDataSource(config);
testShardingService = new TestShardingService(dataSource);
- this.initEnvironment();
+ initEnvironment();
testShardingService.processSuccess();
testShardingService.cleanEnvironment();
}
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 a86bb139833..85cda969606 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
@@ -38,7 +38,7 @@ class SQLServerTest {
config.setJdbcUrl("jdbc:shardingsphere:classpath:test-native/yaml/databases/sqlserver.yaml");
DataSource dataSource = new HikariDataSource(config);
testShardingService = new TestShardingService(dataSource);
- this.initEnvironment();
+ initEnvironment();
testShardingService.processSuccess();
testShardingService.cleanEnvironment();
}
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 d8e6c9bb618..bd6a2874ce4 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
@@ -55,9 +55,9 @@ class EncryptTest {
orderRepository = new OrderRepository(dataSource);
orderItemRepository = new OrderItemRepository(dataSource);
addressRepository = new AddressRepository(dataSource);
- this.initEnvironment();
- this.processSuccess();
- this.cleanEnvironment();
+ initEnvironment();
+ processSuccess();
+ cleanEnvironment();
}
private void initEnvironment() throws SQLException {
@@ -72,11 +72,11 @@ class EncryptTest {
private void processSuccess() throws SQLException {
final Collection<Long> orderIds = insertData();
assertThat(orderRepository.selectAll(),
- equalTo(IntStream.range(1, 11).mapToObj(i -> new Order(i, i %
2, i, i, "INSERT_TEST")).collect(Collectors.toList())));
+ equalTo(IntStream.range(1, 11).mapToObj(each -> new
Order(each, each % 2, each, each,
"INSERT_TEST")).collect(Collectors.toList())));
assertThat(orderItemRepository.selectAll(),
- equalTo(IntStream.range(1, 11).mapToObj(i -> new OrderItem(i,
i, i, "13800000001", "INSERT_TEST")).collect(Collectors.toList())));
+ equalTo(IntStream.range(1, 11).mapToObj(each -> new
OrderItem(each, each, each, "13800000001",
"INSERT_TEST")).collect(Collectors.toList())));
assertThat(addressRepository.selectAll(),
- equalTo(LongStream.range(1, 11).mapToObj(i -> new Address(i,
"address_test_" + i)).collect(Collectors.toList())));
+ equalTo(LongStream.range(1L, 11L).mapToObj(each -> new
Address(each, "address_test_" + each)).collect(Collectors.toList())));
deleteData(orderIds);
assertThat(orderRepository.selectAll(), equalTo(new ArrayList<>()));
assertThat(orderItemRepository.selectAll(), equalTo(new
ArrayList<>()));
@@ -106,7 +106,7 @@ class EncryptTest {
}
private void deleteData(final Collection<Long> orderIds) throws
SQLException {
- long count = 1;
+ long count = 1L;
for (Long each : orderIds) {
orderRepository.delete(each);
orderItemRepository.delete(each);
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 5f9a6742c36..f6fbd6320c4 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
@@ -31,6 +31,7 @@ import javax.sql.DataSource;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.LongStream;
@@ -55,9 +56,9 @@ class MaskTest {
orderRepository = new OrderRepository(dataSource);
orderItemRepository = new OrderItemRepository(dataSource);
addressRepository = new AddressRepository(dataSource);
- this.initEnvironment();
- this.processSuccess();
- this.cleanEnvironment();
+ initEnvironment();
+ processSuccess();
+ cleanEnvironment();
}
private void initEnvironment() throws SQLException {
@@ -72,15 +73,15 @@ class MaskTest {
private void processSuccess() throws SQLException {
final Collection<Long> orderIds = insertData();
assertThat(orderRepository.selectAll(),
- equalTo(IntStream.range(1, 11).mapToObj(i -> new Order(i, i %
2, i, i, "INSERT_TEST")).collect(Collectors.toList())));
+ equalTo(IntStream.range(1, 11).mapToObj(each -> new
Order(each, each % 2, each, each,
"INSERT_TEST")).collect(Collectors.toList())));
assertThat(orderItemRepository.selectAll(),
- equalTo(IntStream.range(1, 11).mapToObj(i -> new OrderItem(i,
i, i, "138****0001", "INSERT_TEST")).collect(Collectors.toList())));
+ equalTo(IntStream.range(1, 11).mapToObj(each -> new
OrderItem(each, each, each, "138****0001",
"INSERT_TEST")).collect(Collectors.toList())));
assertThat(addressRepository.selectAll(),
- equalTo(LongStream.range(1, 11).mapToObj(i -> new Address(i,
"address_test_" + i)).collect(Collectors.toList())));
+ equalTo(LongStream.range(1L, 11L).mapToObj(each -> new
Address(each, "address_test_" + each)).collect(Collectors.toList())));
deleteData(orderIds);
- assertThat(orderRepository.selectAll(), equalTo(new ArrayList<>()));
- assertThat(orderItemRepository.selectAll(), equalTo(new
ArrayList<>()));
- assertThat(addressRepository.selectAll(), equalTo(new ArrayList<>()));
+ assertThat(orderRepository.selectAll(),
equalTo(Collections.emptyList()));
+ assertThat(orderItemRepository.selectAll(),
equalTo(Collections.emptyList()));
+ assertThat(addressRepository.selectAll(),
equalTo(Collections.emptyList()));
}
private Collection<Long> insertData() throws SQLException {
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 e83e9e0a5a4..d2c52b66a65 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
@@ -52,9 +52,9 @@ class ReadWriteSplittingTest {
orderRepository = new OrderRepository(dataSource);
orderItemRepository = new OrderItemRepository(dataSource);
addressRepository = new AddressRepository(dataSource);
- this.initEnvironment();
- this.processSuccess();
- this.cleanEnvironment();
+ initEnvironment();
+ processSuccess();
+ cleanEnvironment();
}
private void initEnvironment() throws SQLException {
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 fea3bb471da..f195e623f0f 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
@@ -56,9 +56,9 @@ class ShadowTest {
orderRepository = new OrderRepository(dataSource);
orderItemRepository = new OrderItemRepository(dataSource);
addressRepository = new AddressRepository(dataSource);
- this.initEnvironment();
- this.processSuccess();
- this.cleanEnvironment();
+ initEnvironment();
+ processSuccess();
+ cleanEnvironment();
}
private void initEnvironment() throws SQLException {
@@ -74,34 +74,34 @@ class ShadowTest {
private void processSuccess() throws SQLException {
final Collection<Long> orderIds = insertData();
- assertThat(this.selectAll(), equalTo(Arrays.asList(
- new Order(1, 0, 2, 2, "INSERT_TEST"),
- new Order(2, 0, 4, 4, "INSERT_TEST"),
- new Order(3, 0, 6, 6, "INSERT_TEST"),
- new Order(4, 0, 8, 8, "INSERT_TEST"),
- new Order(5, 0, 10, 10, "INSERT_TEST"),
- new Order(1, 1, 1, 1, "INSERT_TEST"),
- new Order(2, 1, 3, 3, "INSERT_TEST"),
- new Order(3, 1, 5, 5, "INSERT_TEST"),
- new Order(4, 1, 7, 7, "INSERT_TEST"),
- new Order(5, 1, 9, 9, "INSERT_TEST"))));
+ assertThat(selectAll(), equalTo(Arrays.asList(
+ new Order(1L, 0, 2, 2L, "INSERT_TEST"),
+ new Order(2L, 0, 4, 4L, "INSERT_TEST"),
+ new Order(3L, 0, 6, 6L, "INSERT_TEST"),
+ new Order(4L, 0, 8, 8L, "INSERT_TEST"),
+ new Order(5L, 0, 10, 10L, "INSERT_TEST"),
+ new Order(1L, 1, 1, 1L, "INSERT_TEST"),
+ new Order(2L, 1, 3, 3L, "INSERT_TEST"),
+ new Order(3L, 1, 5, 5L, "INSERT_TEST"),
+ new Order(4L, 1, 7, 7L, "INSERT_TEST"),
+ new Order(5L, 1, 9, 9L, "INSERT_TEST"))));
assertThat(orderItemRepository.selectAll(), equalTo(Arrays.asList(
- new OrderItem(1, 1, 1, "13800000001", "INSERT_TEST"),
- new OrderItem(2, 1, 2, "13800000001", "INSERT_TEST"),
- new OrderItem(3, 2, 3, "13800000001", "INSERT_TEST"),
- new OrderItem(4, 2, 4, "13800000001", "INSERT_TEST"),
- new OrderItem(5, 3, 5, "13800000001", "INSERT_TEST"),
- new OrderItem(6, 3, 6, "13800000001", "INSERT_TEST"),
- new OrderItem(7, 4, 7, "13800000001", "INSERT_TEST"),
- new OrderItem(8, 4, 8, "13800000001", "INSERT_TEST"),
- new OrderItem(9, 5, 9, "13800000001", "INSERT_TEST"),
- new OrderItem(10, 5, 10, "13800000001", "INSERT_TEST"))));
+ new OrderItem(1L, 1L, 1, "13800000001", "INSERT_TEST"),
+ new OrderItem(2L, 1L, 2, "13800000001", "INSERT_TEST"),
+ new OrderItem(3L, 2L, 3, "13800000001", "INSERT_TEST"),
+ new OrderItem(4L, 2L, 4, "13800000001", "INSERT_TEST"),
+ new OrderItem(5L, 3L, 5, "13800000001", "INSERT_TEST"),
+ new OrderItem(6L, 3L, 6, "13800000001", "INSERT_TEST"),
+ new OrderItem(7L, 4L, 7, "13800000001", "INSERT_TEST"),
+ new OrderItem(8L, 4L, 8, "13800000001", "INSERT_TEST"),
+ new OrderItem(9L, 5L, 9, "13800000001", "INSERT_TEST"),
+ new OrderItem(10L, 5L, 10, "13800000001", "INSERT_TEST"))));
assertThat(addressRepository.selectAll(),
- equalTo(LongStream.range(1, 11).mapToObj(i -> new Address(i,
"address_test_" + i)).collect(Collectors.toList())));
+ equalTo(LongStream.range(1L, 11L).mapToObj(each -> new
Address(each, "address_test_" + each)).collect(Collectors.toList())));
deleteData(orderIds);
- assertThat(this.selectAll(), equalTo(Collections.singletonList(new
Order(1, 0, 2, 2, "INSERT_TEST"))));
- assertThat(orderItemRepository.selectAll(), equalTo(new
ArrayList<>()));
- assertThat(addressRepository.selectAll(), equalTo(new ArrayList<>()));
+ assertThat(selectAll(), equalTo(Collections.singletonList(new
Order(1L, 0, 2, 2L, "INSERT_TEST"))));
+ assertThat(orderItemRepository.selectAll(),
equalTo(Collections.emptyList()));
+ assertThat(addressRepository.selectAll(),
equalTo(Collections.emptyList()));
}
private Collection<Long> insertData() throws SQLException {
@@ -127,7 +127,7 @@ class ShadowTest {
}
private void deleteData(final Collection<Long> orderIds) throws
SQLException {
- long count = 1;
+ long count = 1L;
for (Long each : orderIds) {
orderRepository.deleteShadow(each);
orderRepository.delete(each);
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 79e34f43470..99d18af2843 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
@@ -36,7 +36,7 @@ class ShardingTest {
config.setJdbcUrl("jdbc:shardingsphere:classpath:test-native/yaml/features/sharding.yaml");
DataSource dataSource = new HikariDataSource(config);
testShardingService = new TestShardingService(dataSource);
- this.initEnvironment();
+ initEnvironment();
testShardingService.processSuccess();
testShardingService.cleanEnvironment();
}
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 a84a82dcabb..b3f0b73301a 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
@@ -51,7 +51,7 @@ class SeataTest {
container.start();
DataSource dataSource = createDataSource();
testShardingService = new TestShardingService(dataSource);
- this.initEnvironment();
+ initEnvironment();
testShardingService.processSuccess();
testShardingService.cleanEnvironment();
}
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 9c07794f55c..9df766bec81 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
@@ -36,7 +36,7 @@ class AtomikosTest {
config.setJdbcUrl("jdbc:shardingsphere:classpath:test-native/yaml/transactions/xa/atomikos.yaml");
DataSource dataSource = new HikariDataSource(config);
testShardingService = new TestShardingService(dataSource);
- this.initEnvironment();
+ initEnvironment();
testShardingService.processSuccess();
testShardingService.cleanEnvironment();
}
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 48073f62fcc..87993a52150 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
@@ -39,7 +39,7 @@ class NarayanaTest {
config.setJdbcUrl("jdbc:shardingsphere:classpath:test-native/yaml/transactions/xa/narayana.yaml");
DataSource dataSource = new HikariDataSource(config);
testShardingService = new TestShardingService(dataSource);
- this.initEnvironment();
+ initEnvironment();
testShardingService.processSuccess();
testShardingService.cleanEnvironment();
}