mirror of
https://github.com/apache/sqoop.git
synced 2025-05-06 13:32:37 +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:
parent
5b691c2b10
commit
63c5dd57af
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user