mirror of
https://github.com/apache/sqoop.git
synced 2025-05-18 09:51:11 +08:00
SQOOP-2754: Sqoop2: Fix bug in integration test for Mysql and Postgresql
(Colin Ma via Jarek Jarcec Cecho)
This commit is contained in:
parent
889fde9a1a
commit
bf5cc533b3
@ -17,6 +17,7 @@
|
||||
*/
|
||||
package org.apache.sqoop.integration.repository.mysql;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -145,9 +146,13 @@ public void testFindJobsByConnector() throws Exception {
|
||||
.findJobsForConnectorUpgrade(
|
||||
handler.findConnector("A", provider.getConnection())
|
||||
.getPersistenceId(), provider.getConnection());
|
||||
List<String> jobNames = new ArrayList<String>();
|
||||
for (MJob job : list) {
|
||||
jobNames.add(job.getName());
|
||||
}
|
||||
assertEquals(2, list.size());
|
||||
assertEquals(JOB_A_NAME, list.get(0).getName());
|
||||
assertEquals(JOB_B_NAME, list.get(1).getName());
|
||||
assertTrue(jobNames.contains(JOB_A_NAME));
|
||||
assertTrue(jobNames.contains(JOB_B_NAME));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -62,7 +62,8 @@ public void setUpClass() {
|
||||
@BeforeMethod(alwaysRun = true)
|
||||
public void setUp() throws Exception {
|
||||
provider.start();
|
||||
|
||||
// clear the data for sqoop
|
||||
provider.dropSchema("SQOOP");
|
||||
handler = new PostgresqlRepositoryHandler();
|
||||
handler.createOrUpgradeRepository(provider.getConnection());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user