You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2022/04/23 09:32:01 UTC

[shardingsphere] branch master updated: Fix CI (#17031)

This is an automated email from the ASF dual-hosted git repository.

zhonghongsheng 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 fa4c0df965c Fix CI (#17031)
fa4c0df965c is described below

commit fa4c0df965c941e3f1803f50d03dc07d9779f5ef
Author: zhaojinchao <zh...@apache.org>
AuthorDate: Sat Apr 23 17:31:44 2022 +0800

    Fix CI (#17031)
---
 .../dbdiscovery/opengauss/OpenGaussDatabaseDiscoveryType.java      | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-opengauss/src/main/java/org/apache/shardingsphere/dbdiscovery/opengauss/OpenGaussDatabaseDiscoveryType.java b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-opengauss/src/main/java/org/apache/shardingsphere/dbdiscovery/opengauss/OpenGaussDatabaseDiscoveryType.java
index 3aa7fb9374b..f95e5c53720 100644
--- a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-opengauss/src/main/java/org/apache/shardingsphere/dbdiscovery/opengauss/OpenGaussDatabaseDiscoveryType.java
+++ b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-provider/shardingsphere-db-discovery-opengauss/src/main/java/org/apache/shardingsphere/dbdiscovery/opengauss/OpenGaussDatabaseDiscoveryType.java
@@ -53,9 +53,10 @@ public final class OpenGaussDatabaseDiscoveryType implements DatabaseDiscoveryTy
     
     @Override
     public OpenGaussHighlyAvailableStatus loadHighlyAvailableStatus(final DataSource dataSource) throws SQLException {
-        try (Connection connection = dataSource.getConnection();
-             Statement statement = connection.createStatement();
-             ResultSet resultSet = statement.executeQuery(DB_ROLE)) {
+        try (
+                Connection connection = dataSource.getConnection();
+                Statement statement = connection.createStatement();
+                ResultSet resultSet = statement.executeQuery(DB_ROLE)) {
             return new OpenGaussHighlyAvailableStatus(resultSet.next() && resultSet.getString("local_role").equals("Primary"));
         }
     }