5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-06 17:01:59 +08:00

SQOOP-2442: Sqoop2: Generic JDBC: Drop tests for specifying schema name and custom SQL at the same time

(Jarek Jarcec Cecho via Abraham Elmahrek)
This commit is contained in:
Abraham Elmahrek 2015-08-12 13:01:28 -07:00
parent 5b691c2b10
commit 63c5dd57af

View File

@ -190,27 +190,6 @@ public void testTableNameWithTableColumnsWithSchema() throws Exception {
verifyResult(context, "INSERT INTO " + fullTableName + " (" + tableColumns + ") VALUES (?,?)");
}
@Test
@SuppressWarnings("unchecked")
public void testTableSqlWithSchema() throws Exception {
LinkConfiguration linkConfig = new LinkConfiguration();
ToJobConfiguration jobConfig = new ToJobConfiguration();
linkConfig.linkConfig.jdbcDriver = GenericJdbcTestConstants.DRIVER;
linkConfig.linkConfig.connectionString = GenericJdbcTestConstants.URL;
jobConfig.toJobConfig.schemaName = schemaName;
jobConfig.toJobConfig.sql = tableSql;
MutableContext context = new MutableMapContext();
InitializerContext initializerContext = new InitializerContext(context);
@SuppressWarnings("rawtypes")
Initializer initializer = new GenericJdbcToInitializer();
initializer.initialize(initializerContext, linkConfig, jobConfig);
verifyResult(context, tableSql);
}
private void verifyResult(MutableContext context, String dataSql) {
assertEquals(dataSql, context.getString(
GenericJdbcConnectorConstants.CONNECTOR_JDBC_TO_DATA_SQL));