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

[shardingsphere] branch master updated: Fix checkstyle. (#21143)

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

jianglongtao 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 b0cb8973903 Fix checkstyle. (#21143)
b0cb8973903 is described below

commit b0cb89739039edd80122de7bc3f982592a906748
Author: yx9o <ya...@163.com>
AuthorDate: Fri Sep 23 00:32:32 2022 +0800

    Fix checkstyle. (#21143)
---
 .../distsql/rdl/resource/DropResourceBackendHandlerTest.java | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/resource/DropResourceBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/resource/DropResourceBackendHandlerTest.java
index f5aae255c7a..67efa94b26c 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/resource/DropResourceBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/resource/DropResourceBackendHandlerTest.java
@@ -110,8 +110,8 @@ public final class DropResourceBackendHandlerTest extends ProxyContextRestorer {
     public void assertResourceNameNotExistedExecute() {
         try {
             dropResourceBackendHandler.execute("test", new DropResourceStatement(Collections.singleton("foo_ds"), false));
-        } catch (final SQLException ex) {
-            assertThat(ex.getMessage(), is("Resources [foo_ds] do not exist in database test."));
+        } catch (final DistSQLException ex) {
+            assertThat(ex.toSQLException().getMessage(), is("Resources `[foo_ds]` do not exist in database `test`"));
         }
     }
     
@@ -125,8 +125,8 @@ public final class DropResourceBackendHandlerTest extends ProxyContextRestorer {
         when(contextManager.getMetaDataContexts().getMetaData().getDatabase("test")).thenReturn(database);
         try {
             dropResourceBackendHandler.execute("test", new DropResourceStatement(Collections.singleton("foo_ds"), false));
-        } catch (final SQLException ex) {
-            assertThat(ex.getMessage(), is("Resource [foo_ds] is still used by [ShadowRule]."));
+        } catch (final DistSQLException ex) {
+            assertThat(ex.toSQLException().getMessage(), is("Resource `foo_ds` is still used by `[ShadowRule]`"));
         }
     }
     
@@ -142,8 +142,8 @@ public final class DropResourceBackendHandlerTest extends ProxyContextRestorer {
         when(contextManager.getMetaDataContexts().getMetaData().getDatabase("test")).thenReturn(database);
         try {
             dropResourceBackendHandler.execute("test", new DropResourceStatement(Collections.singleton("foo_ds"), false));
-        } catch (final SQLException ex) {
-            assertThat(ex.getMessage(), is("Resource [foo_ds] is still used by [SingleTableRule]."));
+        } catch (final DistSQLException ex) {
+            assertThat(ex.toSQLException().getMessage(), is("Resource `foo_ds` is still used by `[SingleTableRule]`"));
         }
     }