use of com.google.appengine.tools.development.testing.LocalRdbmsServiceTestConfig in project flyway by flyway.
the class GoogleCloudSQLMigrationMediumTest method createDataSource.
@Override
protected DataSource createDataSource(Properties customProperties) throws Exception {
String user = customProperties.getProperty("mysql.user", "flyway");
String password = customProperties.getProperty("mysql.password", "flyway");
String url = customProperties.getProperty("mysql.cloudsql_url", "jdbc:mysql://localhost:3306/flyway_cloudsql_db");
LocalRdbmsServiceTestConfig config = new LocalRdbmsServiceTestConfig();
config.setServerType(LocalRdbmsService.ServerType.LOCAL);
ClassUtils.instantiate("com.mysql.jdbc.Driver", Thread.currentThread().getContextClassLoader());
config.setDriverClass("com.mysql.jdbc.Driver");
config.setJdbcConnectionStringFormat(url);
config.setUser(user);
config.setPassword(password);
helper = new LocalServiceTestHelper(config);
helper.setUp();
return new DriverDataSource(Thread.currentThread().getContextClassLoader(), null, "jdbc:google:rdbms://localhost/flyway_cloudsql_db", "", "", null);
}
Aggregations