Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix unit tests after mysql update #463

Merged
merged 1 commit into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/test/java/liquibase/ext/percona/NoOpMySqlConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import com.mysql.cj.conf.HostInfo;
import com.mysql.cj.conf.PropertyKey;
import com.mysql.cj.jdbc.ConnectionImpl;
import com.mysql.cj.jdbc.JdbcPropertySet;
import com.mysql.cj.jdbc.JdbcPropertySetImpl;
import com.mysql.cj.protocol.NetworkResources;

public class NoOpMySqlConnection extends ConnectionImpl {
Expand All @@ -33,8 +35,13 @@ public class NoOpMySqlConnection extends ConnectionImpl {

public NoOpMySqlConnection(String hostToConnectTo, int portToConnectTo, Properties info,
String databaseToConnectTo, String url) throws SQLException {
super(convert(hostToConnectTo, portToConnectTo, info, databaseToConnectTo, url));
super();
this.info = info;

HostInfo hostInfo = convert(hostToConnectTo, portToConnectTo, info, databaseToConnectTo, url);
this.props = hostInfo.exposeAsProperties();
this.propertySet = new JdbcPropertySetImpl();
this.propertySet.initializeProperties(this.props);
}

private static HostInfo convert(String hostToConnectTo, int portToConnectTo, Properties info,
Expand Down
Loading