Skip to content

Commit

Permalink
[hotfix][test] fix the error in MySqlSourceITCase when adding the sav…
Browse files Browse the repository at this point in the history
…epoint path
  • Loading branch information
ruanhang1993 committed Aug 4, 2022
1 parent a5dd0c0 commit 08ff6d3
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import org.junit.rules.TemporaryFolder;
import org.junit.rules.Timeout;

import java.lang.reflect.Method;
import java.lang.reflect.Field;
import java.sql.SQLException;
import java.time.ZoneId;
import java.util.ArrayList;
Expand Down Expand Up @@ -557,9 +557,9 @@ private StreamExecutionEnvironment getStreamExecutionEnvironment(
Class<?> clazz =
classLoader.loadClass(
"org.apache.flink.streaming.api.environment.StreamExecutionEnvironment");
Method getConfigurationMethod = clazz.getDeclaredMethod("getConfiguration");
getConfigurationMethod.setAccessible(true);
Configuration configuration = (Configuration) getConfigurationMethod.invoke(env);
Field field = clazz.getDeclaredField("configuration");
field.setAccessible(true);
Configuration configuration = (Configuration) field.get(env);
configuration.setString(SavepointConfigOptions.SAVEPOINT_PATH, finishedSavePointPath);
}
env.setParallelism(parallelism);
Expand Down

0 comments on commit 08ff6d3

Please sign in to comment.