You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/09/06 03:19:06 UTC

[GitHub] [shardingsphere] fwhdzh commented on a change in pull request #12159: Issue10968

fwhdzh commented on a change in pull request #12159:
URL: https://github.com/apache/shardingsphere/pull/12159#discussion_r702537464



##########
File path: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rewrite/token/ProjectionsTokenGeneratorTest.java
##########
@@ -59,27 +59,25 @@
 
     private static final String TEST_DERIVED_PROJECTION_ALIAS = "TEST_DERIVED_PROJECTION_ALIAS";
 
-    private static final int TEST_STOP_INDEX = 2;
-
     private static final String TEST_LOGIC_TABLE_NAME = "TEST_LOGIC_TABLE_NAME";
 
-    private static final String TEST_ACTUAL_TABLE_NAME = "TEST_ACTUAL_TABLE_NAME";
-
     private static final String TEST_ACTUAL_TABLE_NAME_WRAPPED = "TEST_ACTUAL_TABLE_NAME_WRAPPED";
 
     private static final String TEST_OTHER_DERIVED_PROJECTION_ALIAS = "TEST_OTHER_DERIVED_PROJECTION_ALIAS";
 
     private static final String TEST_OTHER_DERIVED_PROJECTION_EXPRESSION = "TEST_OTHER_DERIVED_PROJECTION_EXPRESSION";
 
-    private RouteUnit routeUnit = mock(RouteUnit.class);
+    private RouteUnit routeUnit;
 
     @Before
     public void setup() {
         RouteMapper routeMapper = mock(RouteMapper.class);
         when(routeMapper.getLogicName()).thenReturn(TEST_LOGIC_TABLE_NAME);
-        when(routeMapper.getActualName()).thenReturn(TEST_ACTUAL_TABLE_NAME);
+        final String testActualTableName = "TEST_ACTUAL_TABLE_NAME";
+        when(routeMapper.getActualName()).thenReturn(testActualTableName);

Review comment:
       Okay, I will fix it. 
   If the variable is a int instead of a string, should I also use it directly?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org