use of org.apache.flink.connector.jdbc.catalog.PostgresCatalog in project flink by apache.
the class JdbcCatalogFactoryTest method test.
@Test
public void test() {
final Map<String, String> options = new HashMap<>();
options.put(CommonCatalogOptions.CATALOG_TYPE.key(), JdbcCatalogFactoryOptions.IDENTIFIER);
options.put(JdbcCatalogFactoryOptions.DEFAULT_DATABASE.key(), PostgresCatalog.DEFAULT_DATABASE);
options.put(JdbcCatalogFactoryOptions.USERNAME.key(), TEST_USERNAME);
options.put(JdbcCatalogFactoryOptions.PASSWORD.key(), TEST_PWD);
options.put(JdbcCatalogFactoryOptions.BASE_URL.key(), baseUrl);
final Catalog actualCatalog = FactoryUtil.createCatalog(TEST_CATALOG_NAME, options, null, Thread.currentThread().getContextClassLoader());
checkEquals(catalog, (JdbcCatalog) actualCatalog);
assertTrue(((JdbcCatalog) actualCatalog).getInternal() instanceof PostgresCatalog);
}
Aggregations