Search in sources :

Example 1 with LocalServiceTestHelper

use of com.google.appengine.tools.development.testing.LocalServiceTestHelper 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);
}
Also used : LocalRdbmsServiceTestConfig(com.google.appengine.tools.development.testing.LocalRdbmsServiceTestConfig) DriverDataSource(org.flywaydb.core.internal.util.jdbc.DriverDataSource) LocalServiceTestHelper(com.google.appengine.tools.development.testing.LocalServiceTestHelper)

Example 2 with LocalServiceTestHelper

use of com.google.appengine.tools.development.testing.LocalServiceTestHelper in project twitter4j by yusuke.

the class GAETwitterTest method setUp.

protected void setUp() throws Exception {
    super.setUp();
    new LocalServiceTestHelper().setUp();
}
Also used : LocalServiceTestHelper(com.google.appengine.tools.development.testing.LocalServiceTestHelper)

Aggregations

LocalServiceTestHelper (com.google.appengine.tools.development.testing.LocalServiceTestHelper)2 LocalRdbmsServiceTestConfig (com.google.appengine.tools.development.testing.LocalRdbmsServiceTestConfig)1 DriverDataSource (org.flywaydb.core.internal.util.jdbc.DriverDataSource)1