Skip to content

Commit

Permalink
[INLONG-8997][Sort] Keep the logic the same of mysql with flink v1.13…
Browse files Browse the repository at this point in the history
… in end to end test
  • Loading branch information
liaosunny123 authored Oct 11, 2023
1 parent 16f891b commit f462e67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ protected Set<Integer> getLivenessCheckPorts() {

@Override
protected void configure() {
// HERE is the difference, copy to /etc/mysql/, if copy to /etc/mysql/conf.d will be wrong
optionallyMapResourceParameterAsVolume(
MY_CNF_CONFIG_OVERRIDE_PARAM_NAME, "/etc/mysql/", "mysql-default-conf");

if (parameters.containsKey(SETUP_SQL_PARAM_NAME)) {
optionallyMapResourceParameterAsVolume(
SETUP_SQL_PARAM_NAME, "/docker-entrypoint-initdb.d/", "N/A");
Expand All @@ -79,6 +75,7 @@ protected void configure() {
throw new ContainerLaunchException(
"Empty password can be used only with the root user");
}
withCommand("--default-authentication-plugin=mysql_native_password");
setStartupAttempts(3);
}

Expand All @@ -100,7 +97,8 @@ public String getJdbcUrl(String databaseName) {
+ getDatabasePort()
+ "/"
+ databaseName
+ additionalUrlParams;
+ additionalUrlParams
+ "?useSSL=false&allowPublicKeyRetrieval=true";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public MySqlContainer() {

public MySqlContainer(MySqlVersion version) {
super(DockerImageName.parse(IMAGE + ":" + version.getVersion()));
addFixedExposedPort(33306, 3306);
addExposedPort(MYSQL_PORT);
}

@Override
Expand All @@ -59,8 +59,6 @@ protected Set<Integer> getLivenessCheckPorts() {

@Override
protected void configure() {
// HERE is the difference, copy to /etc/mysql/, if copy to /etc/mysql/conf.d will be wrong

if (parameters.containsKey(SETUP_SQL_PARAM_NAME)) {
optionallyMapResourceParameterAsVolume(
SETUP_SQL_PARAM_NAME, "/docker-entrypoint-initdb.d/", "N/A");
Expand Down

0 comments on commit f462e67

Please sign in to comment.