sandynz commented on code in PR #22048:
URL: https://github.com/apache/shardingsphere/pull/22048#discussion_r1019054039


##########
test/pipeline/src/test/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/DataMatchDataConsistencyCalculateAlgorithmTest.java:
##########
@@ -80,37 +82,43 @@ private void createTableAndInitData(final 
PipelineDataSourceWrapper dataSource,
         }
     }
     
+    @SuppressWarnings("unchecked")
     @Test
-    public void assertCalculateFromBegin() throws NoSuchFieldException, 
IllegalAccessException {
+    public void assertCalculateFromBegin() throws NoSuchFieldException, 
IllegalAccessException, InvocationTargetException, NoSuchMethodException {
         DataMatchDataConsistencyCalculateAlgorithm calculateAlgorithm = new 
DataMatchDataConsistencyCalculateAlgorithm();
         ReflectionUtil.setFieldValue(calculateAlgorithm, "chunkSize", 5);
         DataConsistencyCalculateParameter sourceParameter = 
generateParameter(source, "t_order_copy", null);
-        Optional<DataConsistencyCalculatedResult> sourceCalculateResult = 
calculateAlgorithm.calculateChunk(sourceParameter);
+        Optional<DataConsistencyCalculatedResult> sourceCalculateResult = 
(Optional<DataConsistencyCalculatedResult>) 
ReflectionUtil.invokeMethod(calculateAlgorithm, "calculateChunk",
+                new Class[]{DataConsistencyCalculateParameter.class}, new 
Object[]{sourceParameter});

Review Comment:
   Why change the test class package and replace `calculateChunk` invocation to 
reflection



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to