sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject [1/9] SQOOP-1379: Sqoop2: From/To: Disable tests
Date Wed, 16 Jul 2014 04:15:16 GMT
Repository: sqoop
Updated Branches:
  refs/heads/SQOOP-1367 e60fda87d -> d883557dc


http://git-wip-us.apache.org/repos/asf/sqoop/blob/d883557d/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestSubmissionHandling.java
----------------------------------------------------------------------
diff --git a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestSubmissionHandling.java
b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestSubmissionHandling.java
index 8fce0dd..8cfe076 100644
--- a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestSubmissionHandling.java
+++ b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestSubmissionHandling.java
@@ -32,214 +32,214 @@ import java.util.List;
  */
 public class TestSubmissionHandling extends DerbyTestCase {
 
-  DerbyRepositoryHandler handler;
-
-  @Override
-  public void setUp() throws Exception {
-    super.setUp();
-
-    handler = new DerbyRepositoryHandler();
-
-    // We always needs schema for this test case
-    createSchema();
-
-    // We always needs connector and framework structures in place
-    loadConnectorAndFramework();
-
-    // We also always needs connection metadata in place
-    loadConnections();
-
-    // And finally we always needs job metadata in place
-    loadJobs();
-  }
-
-  public void testFindSubmissionsUnfinished() throws Exception {
-    List<MSubmission> submissions;
-
-    submissions = handler.findSubmissionsUnfinished(getDerbyConnection());
-    assertNotNull(submissions);
-    assertEquals(0, submissions.size());
-
-    loadSubmissions();
-
-    submissions = handler.findSubmissionsUnfinished(getDerbyConnection());
-    assertNotNull(submissions);
-    assertEquals(2, submissions.size());
-  }
-
-  public void testExistsSubmission() throws Exception {
-    // There shouldn't be anything on empty repository
-    assertFalse(handler.existsSubmission(1, getDerbyConnection()));
-    assertFalse(handler.existsSubmission(2, getDerbyConnection()));
-    assertFalse(handler.existsSubmission(3, getDerbyConnection()));
-    assertFalse(handler.existsSubmission(4, getDerbyConnection()));
-    assertFalse(handler.existsSubmission(5, getDerbyConnection()));
-    assertFalse(handler.existsSubmission(6, getDerbyConnection()));
-
-    loadSubmissions();
-
-    assertTrue(handler.existsSubmission(1, getDerbyConnection()));
-    assertTrue(handler.existsSubmission(2, getDerbyConnection()));
-    assertTrue(handler.existsSubmission(3, getDerbyConnection()));
-    assertTrue(handler.existsSubmission(4, getDerbyConnection()));
-    assertTrue(handler.existsSubmission(5, getDerbyConnection()));
-    assertFalse(handler.existsSubmission(6, getDerbyConnection()));
-  }
-
-  public void testCreateSubmission() throws Exception {
-    Date creationDate = new Date();
-    Date updateDate = new Date();
-
-    CounterGroup firstGroup = new CounterGroup("ga");
-    CounterGroup secondGroup = new CounterGroup("gb");
-    firstGroup.addCounter(new Counter("ca", 100));
-    firstGroup.addCounter(new Counter("cb", 200));
-    secondGroup.addCounter(new Counter("ca", 300));
-    secondGroup.addCounter(new Counter("cd", 400));
-    Counters counters = new Counters();
-    counters.addCounterGroup(firstGroup);
-    counters.addCounterGroup(secondGroup);
-
-    MSubmission submission = new MSubmission();
-    submission.setJobId(1);
-    submission.setStatus(SubmissionStatus.RUNNING);
-    submission.setCreationDate(creationDate);
-    submission.setLastUpdateDate(updateDate);
-    submission.setExternalId("job-x");
-    submission.setExternalLink("http://somewhere");
-    submission.setExceptionInfo("RuntimeException");
-    submission.setExceptionStackTrace("Yeah it happens");
-    submission.setCounters(counters);
-
-    handler.createSubmission(submission, getDerbyConnection());
-
-    assertEquals(1, submission.getPersistenceId());
-    assertCountForTable("SQOOP.SQ_SUBMISSION", 1);
-
-    List<MSubmission> submissions =
-      handler.findSubmissionsUnfinished(getDerbyConnection());
-    assertNotNull(submissions);
-    assertEquals(1, submissions.size());
-
-    submission = submissions.get(0);
-
-    assertEquals(1, submission.getJobId());
-    assertEquals(SubmissionStatus.RUNNING, submission.getStatus());
-    assertEquals(creationDate, submission.getCreationDate());
-    assertEquals(updateDate, submission.getLastUpdateDate());
-    assertEquals("job-x", submission.getExternalId());
-    assertEquals("http://somewhere", submission.getExternalLink());
-    assertEquals("RuntimeException", submission.getExceptionInfo());
-    assertEquals("Yeah it happens", submission.getExceptionStackTrace());
-
-    CounterGroup group;
-    Counter counter;
-    Counters retrievedCounters = submission.getCounters();
-    assertNotNull(retrievedCounters);
-
-    group = counters.getCounterGroup("ga");
-    assertNotNull(group);
-
-    counter = group.getCounter("ca");
-    assertNotNull(counter);
-    assertEquals(100, counter.getValue());
-
-    counter = group.getCounter("cb");
-    assertNotNull(counter);
-    assertEquals(200, counter.getValue());
-
-    group = counters.getCounterGroup("gb");
-    assertNotNull(group);
-
-    counter = group.getCounter("ca");
-    assertNotNull(counter);
-    assertEquals(300, counter.getValue());
-
-    counter = group.getCounter("cd");
-    assertNotNull(counter);
-    assertEquals(400, counter.getValue());
-
-    // Let's create second (simpler) connection
-    submission =
-      new MSubmission(1, new Date(), SubmissionStatus.SUCCEEDED, "job-x");
-    handler.createSubmission(submission, getDerbyConnection());
-
-    assertEquals(2, submission.getPersistenceId());
-    assertCountForTable("SQOOP.SQ_SUBMISSION", 2);
-  }
-
-  public void testUpdateConnection() throws Exception {
-    loadSubmissions();
-
-    List<MSubmission> submissions =
-      handler.findSubmissionsUnfinished(getDerbyConnection());
-    assertNotNull(submissions);
-    assertEquals(2, submissions.size());
-
-    MSubmission submission = submissions.get(0);
-    submission.setStatus(SubmissionStatus.SUCCEEDED);
-
-    handler.updateSubmission(submission, getDerbyConnection());
-
-    submissions = handler.findSubmissionsUnfinished(getDerbyConnection());
-    assertNotNull(submissions);
-    assertEquals(1, submissions.size());
-  }
-
-  public void testPurgeSubmissions() throws Exception {
-    loadSubmissions();
-    List<MSubmission> submissions;
-
-    submissions = handler.findSubmissionsUnfinished(getDerbyConnection());
-    assertNotNull(submissions);
-    assertEquals(2, submissions.size());
-    assertCountForTable("SQOOP.SQ_SUBMISSION", 5);
-
-    Calendar calendar = Calendar.getInstance();
-    // 2012-01-03 05:05:05
-    calendar.set(2012, Calendar.JANUARY, 3, 5, 5, 5);
-    handler.purgeSubmissions(calendar.getTime(), getDerbyConnection());
-
-    submissions = handler.findSubmissionsUnfinished(getDerbyConnection());
-    assertNotNull(submissions);
-    assertEquals(1, submissions.size());
-    assertCountForTable("SQOOP.SQ_SUBMISSION", 2);
-
-    handler.purgeSubmissions(new Date(), getDerbyConnection());
-
-    submissions = handler.findSubmissionsUnfinished(getDerbyConnection());
-    assertNotNull(submissions);
-    assertEquals(0, submissions.size());
-    assertCountForTable("SQOOP.SQ_SUBMISSION", 0);
-
-    handler.purgeSubmissions(new Date(), getDerbyConnection());
-
-    submissions = handler.findSubmissionsUnfinished(getDerbyConnection());
-    assertNotNull(submissions);
-    assertEquals(0, submissions.size());
-    assertCountForTable("SQOOP.SQ_SUBMISSION", 0);
-  }
-
-  /**
-   * Test that by directly removing jobs we will also remove associated
-   * submissions and counters.
-   *
-   * @throws Exception
-   */
-  public void testDeleteJobs() throws Exception {
-    loadSubmissions();
-    assertCountForTable("SQOOP.SQ_SUBMISSION", 5);
-
-    handler.deleteJob(1, getDerbyConnection());
-    assertCountForTable("SQOOP.SQ_SUBMISSION", 3);
-
-    handler.deleteJob(2, getDerbyConnection());
-    assertCountForTable("SQOOP.SQ_SUBMISSION", 2);
-
-    handler.deleteJob(3, getDerbyConnection());
-    assertCountForTable("SQOOP.SQ_SUBMISSION", 1);
-
-    handler.deleteJob(4, getDerbyConnection());
-    assertCountForTable("SQOOP.SQ_SUBMISSION", 0);
-  }
+//  DerbyRepositoryHandler handler;
+//
+//  @Override
+//  public void setUp() throws Exception {
+//    super.setUp();
+//
+//    handler = new DerbyRepositoryHandler();
+//
+//    // We always needs schema for this test case
+//    createSchema();
+//
+//    // We always needs connector and framework structures in place
+//    loadConnectorAndFramework();
+//
+//    // We also always needs connection metadata in place
+//    loadConnections();
+//
+//    // And finally we always needs job metadata in place
+//    loadJobs();
+//  }
+//
+//  public void testFindSubmissionsUnfinished() throws Exception {
+//    List<MSubmission> submissions;
+//
+//    submissions = handler.findSubmissionsUnfinished(getDerbyConnection());
+//    assertNotNull(submissions);
+//    assertEquals(0, submissions.size());
+//
+//    loadSubmissions();
+//
+//    submissions = handler.findSubmissionsUnfinished(getDerbyConnection());
+//    assertNotNull(submissions);
+//    assertEquals(2, submissions.size());
+//  }
+//
+//  public void testExistsSubmission() throws Exception {
+//    // There shouldn't be anything on empty repository
+//    assertFalse(handler.existsSubmission(1, getDerbyConnection()));
+//    assertFalse(handler.existsSubmission(2, getDerbyConnection()));
+//    assertFalse(handler.existsSubmission(3, getDerbyConnection()));
+//    assertFalse(handler.existsSubmission(4, getDerbyConnection()));
+//    assertFalse(handler.existsSubmission(5, getDerbyConnection()));
+//    assertFalse(handler.existsSubmission(6, getDerbyConnection()));
+//
+//    loadSubmissions();
+//
+//    assertTrue(handler.existsSubmission(1, getDerbyConnection()));
+//    assertTrue(handler.existsSubmission(2, getDerbyConnection()));
+//    assertTrue(handler.existsSubmission(3, getDerbyConnection()));
+//    assertTrue(handler.existsSubmission(4, getDerbyConnection()));
+//    assertTrue(handler.existsSubmission(5, getDerbyConnection()));
+//    assertFalse(handler.existsSubmission(6, getDerbyConnection()));
+//  }
+//
+//  public void testCreateSubmission() throws Exception {
+//    Date creationDate = new Date();
+//    Date updateDate = new Date();
+//
+//    CounterGroup firstGroup = new CounterGroup("ga");
+//    CounterGroup secondGroup = new CounterGroup("gb");
+//    firstGroup.addCounter(new Counter("ca", 100));
+//    firstGroup.addCounter(new Counter("cb", 200));
+//    secondGroup.addCounter(new Counter("ca", 300));
+//    secondGroup.addCounter(new Counter("cd", 400));
+//    Counters counters = new Counters();
+//    counters.addCounterGroup(firstGroup);
+//    counters.addCounterGroup(secondGroup);
+//
+//    MSubmission submission = new MSubmission();
+//    submission.setJobId(1);
+//    submission.setStatus(SubmissionStatus.RUNNING);
+//    submission.setCreationDate(creationDate);
+//    submission.setLastUpdateDate(updateDate);
+//    submission.setExternalId("job-x");
+//    submission.setExternalLink("http://somewhere");
+//    submission.setExceptionInfo("RuntimeException");
+//    submission.setExceptionStackTrace("Yeah it happens");
+//    submission.setCounters(counters);
+//
+//    handler.createSubmission(submission, getDerbyConnection());
+//
+//    assertEquals(1, submission.getPersistenceId());
+//    assertCountForTable("SQOOP.SQ_SUBMISSION", 1);
+//
+//    List<MSubmission> submissions =
+//      handler.findSubmissionsUnfinished(getDerbyConnection());
+//    assertNotNull(submissions);
+//    assertEquals(1, submissions.size());
+//
+//    submission = submissions.get(0);
+//
+//    assertEquals(1, submission.getJobId());
+//    assertEquals(SubmissionStatus.RUNNING, submission.getStatus());
+//    assertEquals(creationDate, submission.getCreationDate());
+//    assertEquals(updateDate, submission.getLastUpdateDate());
+//    assertEquals("job-x", submission.getExternalId());
+//    assertEquals("http://somewhere", submission.getExternalLink());
+//    assertEquals("RuntimeException", submission.getExceptionInfo());
+//    assertEquals("Yeah it happens", submission.getExceptionStackTrace());
+//
+//    CounterGroup group;
+//    Counter counter;
+//    Counters retrievedCounters = submission.getCounters();
+//    assertNotNull(retrievedCounters);
+//
+//    group = counters.getCounterGroup("ga");
+//    assertNotNull(group);
+//
+//    counter = group.getCounter("ca");
+//    assertNotNull(counter);
+//    assertEquals(100, counter.getValue());
+//
+//    counter = group.getCounter("cb");
+//    assertNotNull(counter);
+//    assertEquals(200, counter.getValue());
+//
+//    group = counters.getCounterGroup("gb");
+//    assertNotNull(group);
+//
+//    counter = group.getCounter("ca");
+//    assertNotNull(counter);
+//    assertEquals(300, counter.getValue());
+//
+//    counter = group.getCounter("cd");
+//    assertNotNull(counter);
+//    assertEquals(400, counter.getValue());
+//
+//    // Let's create second (simpler) connection
+//    submission =
+//      new MSubmission(1, new Date(), SubmissionStatus.SUCCEEDED, "job-x");
+//    handler.createSubmission(submission, getDerbyConnection());
+//
+//    assertEquals(2, submission.getPersistenceId());
+//    assertCountForTable("SQOOP.SQ_SUBMISSION", 2);
+//  }
+//
+//  public void testUpdateConnection() throws Exception {
+//    loadSubmissions();
+//
+//    List<MSubmission> submissions =
+//      handler.findSubmissionsUnfinished(getDerbyConnection());
+//    assertNotNull(submissions);
+//    assertEquals(2, submissions.size());
+//
+//    MSubmission submission = submissions.get(0);
+//    submission.setStatus(SubmissionStatus.SUCCEEDED);
+//
+//    handler.updateSubmission(submission, getDerbyConnection());
+//
+//    submissions = handler.findSubmissionsUnfinished(getDerbyConnection());
+//    assertNotNull(submissions);
+//    assertEquals(1, submissions.size());
+//  }
+//
+//  public void testPurgeSubmissions() throws Exception {
+//    loadSubmissions();
+//    List<MSubmission> submissions;
+//
+//    submissions = handler.findSubmissionsUnfinished(getDerbyConnection());
+//    assertNotNull(submissions);
+//    assertEquals(2, submissions.size());
+//    assertCountForTable("SQOOP.SQ_SUBMISSION", 5);
+//
+//    Calendar calendar = Calendar.getInstance();
+//    // 2012-01-03 05:05:05
+//    calendar.set(2012, Calendar.JANUARY, 3, 5, 5, 5);
+//    handler.purgeSubmissions(calendar.getTime(), getDerbyConnection());
+//
+//    submissions = handler.findSubmissionsUnfinished(getDerbyConnection());
+//    assertNotNull(submissions);
+//    assertEquals(1, submissions.size());
+//    assertCountForTable("SQOOP.SQ_SUBMISSION", 2);
+//
+//    handler.purgeSubmissions(new Date(), getDerbyConnection());
+//
+//    submissions = handler.findSubmissionsUnfinished(getDerbyConnection());
+//    assertNotNull(submissions);
+//    assertEquals(0, submissions.size());
+//    assertCountForTable("SQOOP.SQ_SUBMISSION", 0);
+//
+//    handler.purgeSubmissions(new Date(), getDerbyConnection());
+//
+//    submissions = handler.findSubmissionsUnfinished(getDerbyConnection());
+//    assertNotNull(submissions);
+//    assertEquals(0, submissions.size());
+//    assertCountForTable("SQOOP.SQ_SUBMISSION", 0);
+//  }
+//
+//  /**
+//   * Test that by directly removing jobs we will also remove associated
+//   * submissions and counters.
+//   *
+//   * @throws Exception
+//   */
+//  public void testDeleteJobs() throws Exception {
+//    loadSubmissions();
+//    assertCountForTable("SQOOP.SQ_SUBMISSION", 5);
+//
+//    handler.deleteJob(1, getDerbyConnection());
+//    assertCountForTable("SQOOP.SQ_SUBMISSION", 3);
+//
+//    handler.deleteJob(2, getDerbyConnection());
+//    assertCountForTable("SQOOP.SQ_SUBMISSION", 2);
+//
+//    handler.deleteJob(3, getDerbyConnection());
+//    assertCountForTable("SQOOP.SQ_SUBMISSION", 1);
+//
+//    handler.deleteJob(4, getDerbyConnection());
+//    assertCountForTable("SQOOP.SQ_SUBMISSION", 0);
+//  }
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/d883557d/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableExportTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableExportTest.java
b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableExportTest.java
index 436fdfb..39b48d8 100644
--- a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableExportTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableExportTest.java
@@ -22,7 +22,6 @@ import org.apache.sqoop.test.testcases.ConnectorTestCase;
 import org.apache.sqoop.model.MConnection;
 import org.apache.sqoop.model.MFormList;
 import org.apache.sqoop.model.MJob;
-import org.apache.sqoop.model.MSubmission;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -33,42 +32,42 @@ import static org.junit.Assert.assertTrue;
  */
 public class TableExportTest extends ConnectorTestCase {
 
-  private static final Logger LOG = Logger.getLogger(TableExportTest.class);
-
-  @Test
-  public void testBasicImport() throws Exception {
-    createTableCities();
-    createInputMapreduceFile("input-0001",
-      "1,'USA','San Francisco'",
-      "2,'USA','Sunnyvale'",
-      "3,'Czech Republic','Brno'",
-      "4,'USA','Palo Alto'"
-    );
-
-    // Connection creation
-    MConnection connection = getClient().newConnection("generic-jdbc-connector");
-    fillConnectionForm(connection);
-    createConnection(connection);
-
-    // Job creation
-    MJob job = getClient().newJob(connection.getPersistenceId(), MJob.Type.EXPORT);
-
-    // Connector values
-    MFormList forms = job.getConnectorPart();
-    forms.getStringInput("table.tableName").setValue(provider.escapeTableName(getTableName()));
-    fillInputForm(job);
-    createJob(job);
-
-    runJob(job);
-
-    assertEquals(4L, rowCount());
-    assertRowInCities(1, "USA", "San Francisco");
-    assertRowInCities(2, "USA", "Sunnyvale");
-    assertRowInCities(3, "Czech Republic", "Brno");
-    assertRowInCities(4, "USA", "Palo Alto");
-
-    // Clean up testing table
-    dropTable();
-  }
+//  private static final Logger LOG = Logger.getLogger(TableExportTest.class);
+//
+//  @Test
+//  public void testBasicImport() throws Exception {
+//    createTableCities();
+//    createInputMapreduceFile("input-0001",
+//      "1,'USA','San Francisco'",
+//      "2,'USA','Sunnyvale'",
+//      "3,'Czech Republic','Brno'",
+//      "4,'USA','Palo Alto'"
+//    );
+//
+//    // Connection creation
+//    MConnection connection = getClient().newConnection("generic-jdbc-connector");
+//    fillConnectionForm(connection);
+//    createConnection(connection);
+//
+//    // Job creation
+//    MJob job = getClient().newJob(connection.getPersistenceId(), MJob.Type.EXPORT);
+//
+//    // Connector values
+//    MFormList forms = job.getFromPart();
+//    forms.getStringInput("table.tableName").setValue(provider.escapeTableName(getTableName()));
+//    fillInputForm(job);
+//    createJob(job);
+//
+//    runJob(job);
+//
+//    assertEquals(4L, rowCount());
+//    assertRowInCities(1, "USA", "San Francisco");
+//    assertRowInCities(2, "USA", "Sunnyvale");
+//    assertRowInCities(3, "Czech Republic", "Brno");
+//    assertRowInCities(4, "USA", "Palo Alto");
+//
+//    // Clean up testing table
+//    dropTable();
+//  }
 
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/d883557d/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableImportTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableImportTest.java
b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableImportTest.java
index 465a16d..9e6f991 100644
--- a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableImportTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableImportTest.java
@@ -34,83 +34,83 @@ import static org.junit.Assert.assertTrue;
  */
 public class TableImportTest extends ConnectorTestCase {
 
-  private static final Logger LOG = Logger.getLogger(TableImportTest.class);
-
-  @Test
-  public void testBasicImport() throws Exception {
-    createAndLoadTableCities();
-
-    // Connection creation
-    MConnection connection = getClient().newConnection("generic-jdbc-connector");
-    fillConnectionForm(connection);
-    createConnection(connection);
-
-    // Job creation
-    MJob job = getClient().newJob(connection.getPersistenceId(), MJob.Type.IMPORT);
-
-    // Connector values
-    MFormList forms = job.getConnectorPart();
-    forms.getStringInput("table.tableName").setValue(provider.escapeTableName(getTableName()));
-    forms.getStringInput("table.partitionColumn").setValue(provider.escapeColumnName("id"));
-    // Framework values
-    fillOutputForm(job, StorageType.HDFS, OutputFormat.TEXT_FILE);
-    createJob(job);
-
-    runJob(job);
-
-    // Assert correct output
-    assertMapreduceOutput(
-      "1,'USA','San Francisco'",
-      "2,'USA','Sunnyvale'",
-      "3,'Czech Republic','Brno'",
-      "4,'USA','Palo Alto'"
-    );
-
-    // Clean up testing table
-    dropTable();
-  }
-
-  @Test
-  public void testColumns() throws Exception {
-    createAndLoadTableCities();
-
-    // Connection creation
-    MConnection connection = getClient().newConnection(1L);
-    fillConnectionForm(connection);
-
-    createConnection(connection);
-
-    // Job creation
-    MJob job = getClient().newJob(connection.getPersistenceId(), MJob.Type.IMPORT);
-
-    // Connector values
-    MFormList forms = job.getConnectorPart();
-    forms.getStringInput("table.tableName").setValue(provider.escapeTableName(getTableName()));
-    forms.getStringInput("table.partitionColumn").setValue(provider.escapeColumnName("id"));
-    forms.getStringInput("table.columns").setValue(provider.escapeColumnName("id") + ","
+ provider.escapeColumnName("country"));
-    // Framework values
-    fillOutputForm(job, StorageType.HDFS, OutputFormat.TEXT_FILE);
-    createJob(job);
-
-    MSubmission submission = getClient().startSubmission(job.getPersistenceId());
-    assertTrue(submission.getStatus().isRunning());
-
-    // Wait until the job finish - this active waiting will be removed once
-    // Sqoop client API will get blocking support.
-    do {
-      Thread.sleep(5000);
-      submission = getClient().getSubmissionStatus(job.getPersistenceId());
-    } while(submission.getStatus().isRunning());
-
-    // Assert correct output
-    assertMapreduceOutput(
-      "1,'USA'",
-      "2,'USA'",
-      "3,'Czech Republic'",
-      "4,'USA'"
-    );
-
-    // Clean up testing table
-    dropTable();
-  }
+//  private static final Logger LOG = Logger.getLogger(TableImportTest.class);
+//
+//  @Test
+//  public void testBasicImport() throws Exception {
+//    createAndLoadTableCities();
+//
+//    // Connection creation
+//    MConnection connection = getClient().newConnection("generic-jdbc-connector");
+//    fillConnectionForm(connection);
+//    createConnection(connection);
+//
+//    // Job creation
+//    MJob job = getClient().newJob(connection.getPersistenceId(), MJob.Type.IMPORT);
+//
+//    // Connector values
+//    MFormList forms = job.getFromPart();
+//    forms.getStringInput("table.tableName").setValue(provider.escapeTableName(getTableName()));
+//    forms.getStringInput("table.partitionColumn").setValue(provider.escapeColumnName("id"));
+//    // Framework values
+//    fillOutputForm(job, StorageType.HDFS, OutputFormat.TEXT_FILE);
+//    createJob(job);
+//
+//    runJob(job);
+//
+//    // Assert correct output
+//    assertMapreduceOutput(
+//      "1,'USA','San Francisco'",
+//      "2,'USA','Sunnyvale'",
+//      "3,'Czech Republic','Brno'",
+//      "4,'USA','Palo Alto'"
+//    );
+//
+//    // Clean up testing table
+//    dropTable();
+//  }
+//
+//  @Test
+//  public void testColumns() throws Exception {
+//    createAndLoadTableCities();
+//
+//    // Connection creation
+//    MConnection connection = getClient().newConnection(1L);
+//    fillConnectionForm(connection);
+//
+//    createConnection(connection);
+//
+//    // Job creation
+//    MJob job = getClient().newJob(connection.getPersistenceId(), MJob.Type.IMPORT);
+//
+//    // Connector values
+//    MFormList forms = job.getFromPart();
+//    forms.getStringInput("table.tableName").setValue(provider.escapeTableName(getTableName()));
+//    forms.getStringInput("table.partitionColumn").setValue(provider.escapeColumnName("id"));
+//    forms.getStringInput("table.columns").setValue(provider.escapeColumnName("id") + ","
+ provider.escapeColumnName("country"));
+//    // Framework values
+//    fillOutputForm(job, StorageType.HDFS, OutputFormat.TEXT_FILE);
+//    createJob(job);
+//
+//    MSubmission submission = getClient().startSubmission(job.getPersistenceId());
+//    assertTrue(submission.getStatus().isRunning());
+//
+//    // Wait until the job finish - this active waiting will be removed once
+//    // Sqoop client API will get blocking support.
+//    do {
+//      Thread.sleep(5000);
+//      submission = getClient().getSubmissionStatus(job.getPersistenceId());
+//    } while(submission.getStatus().isRunning());
+//
+//    // Assert correct output
+//    assertMapreduceOutput(
+//      "1,'USA'",
+//      "2,'USA'",
+//      "3,'Czech Republic'",
+//      "4,'USA'"
+//    );
+//
+//    // Clean up testing table
+//    dropTable();
+//  }
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/d883557d/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/exports/TableStagedExportTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/exports/TableStagedExportTest.java
b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/exports/TableStagedExportTest.java
index e36437b..cb028bb 100644
--- a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/exports/TableStagedExportTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/exports/TableStagedExportTest.java
@@ -31,47 +31,47 @@ import static org.junit.Assert.assertEquals;
  */
 public class TableStagedExportTest extends ConnectorTestCase {
 
-  @Test
-  public void testStagedExport() throws Exception {
-    final String stageTableName = "STAGE_" + getTableName();
-    createTableCities();
-    createInputMapreduceFile("input-0001",
-      "1,'USA','San Francisco'",
-      "2,'USA','Sunnyvale'",
-      "3,'Czech Republic','Brno'",
-      "4,'USA','Palo Alto'"
-    );
-    new Cities(provider, stageTableName).createTables();
-    // Connection creation
-    MConnection connection = getClient().newConnection("generic-jdbc-connector");
-    fillConnectionForm(connection);
-    createConnection(connection);
-
-    // Job creation
-    MJob job = getClient().newJob(connection.getPersistenceId(),
-      MJob.Type.EXPORT);
-
-    // Connector values
-    MFormList forms = job.getConnectorPart();
-    forms.getStringInput("table.tableName").setValue(
-      provider.escapeTableName(getTableName()));
-    forms.getStringInput("table.stageTableName").setValue(
-      provider.escapeTableName(stageTableName));
-    fillInputForm(job);
-    createJob(job);
-
-    runJob(job);
-
-    assertEquals(0L, provider.rowCount(stageTableName));
-    assertEquals(4L, rowCount());
-    assertRowInCities(1, "USA", "San Francisco");
-    assertRowInCities(2, "USA", "Sunnyvale");
-    assertRowInCities(3, "Czech Republic", "Brno");
-    assertRowInCities(4, "USA", "Palo Alto");
-
-    // Clean up testing table
-    provider.dropTable(stageTableName);
-    dropTable();
-  }
+//  @Test
+//  public void testStagedExport() throws Exception {
+//    final String stageTableName = "STAGE_" + getTableName();
+//    createTableCities();
+//    createInputMapreduceFile("input-0001",
+//      "1,'USA','San Francisco'",
+//      "2,'USA','Sunnyvale'",
+//      "3,'Czech Republic','Brno'",
+//      "4,'USA','Palo Alto'"
+//    );
+//    new Cities(provider, stageTableName).createTables();
+//    // Connection creation
+//    MConnection connection = getClient().newConnection("generic-jdbc-connector");
+//    fillConnectionForm(connection);
+//    createConnection(connection);
+//
+//    // Job creation
+//    MJob job = getClient().newJob(connection.getPersistenceId(),
+//      MJob.Type.EXPORT);
+//
+//    // Connector values
+//    MFormList forms = job.getFromPart();
+//    forms.getStringInput("table.tableName").setValue(
+//      provider.escapeTableName(getTableName()));
+//    forms.getStringInput("table.stageTableName").setValue(
+//      provider.escapeTableName(stageTableName));
+//    fillInputForm(job);
+//    createJob(job);
+//
+//    runJob(job);
+//
+//    assertEquals(0L, provider.rowCount(stageTableName));
+//    assertEquals(4L, rowCount());
+//    assertRowInCities(1, "USA", "San Francisco");
+//    assertRowInCities(2, "USA", "Sunnyvale");
+//    assertRowInCities(3, "Czech Republic", "Brno");
+//    assertRowInCities(4, "USA", "Palo Alto");
+//
+//    // Clean up testing table
+//    provider.dropTable(stageTableName);
+//    dropTable();
+//  }
 
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/d883557d/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/imports/PartitionerTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/imports/PartitionerTest.java
b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/imports/PartitionerTest.java
index 3642833..1bc3b93 100644
--- a/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/imports/PartitionerTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/imports/PartitionerTest.java
@@ -35,91 +35,91 @@ import org.junit.runners.Parameterized;
 @RunWith(Parameterized.class)
 public class PartitionerTest extends ConnectorTestCase {
 
-  private static final Logger LOG = Logger.getLogger(PartitionerTest.class);
-
-  /**
-   * Columns that we will use as partition column with maximal number of
-   * partitions that can be created for such column.
-   */
-  public static Object[] COLUMNS = new Object [][] {
-    {"id",           13},
-    {"code_name",    13},
-    {"version",      13},
-    {"release_date", 13},
-    {"lts",           2},
-  };
-
-  /**
-   * Number of extractors that we will use to transfer the table.
-   */
-  public static Object [] EXTRACTORS = new Object[] {
-    3, 5, 10, 13,
-  };
-
-  @Parameterized.Parameters(name = "{0}-{1}-{2}")
-  public static Iterable<Object[]> data() {
-    return ParametrizedUtils.crossProduct(COLUMNS, EXTRACTORS);
-  }
-
-  private String partitionColumn;
-  private int extractors;
-  private int maxOutputFiles;
-
-  public PartitionerTest(String partitionColumn, int expectedOutputFiles, int extractors)
{
-    this.partitionColumn = partitionColumn;
-    this.maxOutputFiles = expectedOutputFiles;
-    this.extractors = extractors;
-  }
-
-  @Test
-  public void testSplitter() throws Exception {
-    createAndLoadTableUbuntuReleases();
-
-    // Connection creation
-    MConnection connection = getClient().newConnection("generic-jdbc-connector");
-    fillConnectionForm(connection);
-    createConnection(connection);
-
-    // Job creation
-    MJob job = getClient().newJob(connection.getPersistenceId(), MJob.Type.IMPORT);
-
-    // Connector values
-    MFormList forms = job.getConnectorPart();
-    forms.getStringInput("table.tableName").setValue(provider.escapeTableName(getTableName()));
-    forms.getStringInput("table.partitionColumn").setValue(provider.escapeColumnName(partitionColumn));
-    // Framework values
-    fillOutputForm(job, StorageType.HDFS, OutputFormat.TEXT_FILE);
-    forms = job.getFrameworkPart();
-    forms.getIntegerInput("throttling.extractors").setValue(extractors);
-    createJob(job);
-
-    runJob(job);
-
-    // Assert correct output
-    assertMapreduceOutputFiles((extractors > maxOutputFiles) ? maxOutputFiles : extractors);
-    assertMapreduceOutput(
-      "1,'Warty Warthog',4.10,2004-10-20,false",
-      "2,'Hoary Hedgehog',5.04,2005-04-08,false",
-      "3,'Breezy Badger',5.10,2005-10-13,false",
-      "4,'Dapper Drake',6.06,2006-06-01,true",
-      "5,'Edgy Eft',6.10,2006-10-26,false",
-      "6,'Feisty Fawn',7.04,2007-04-19,false",
-      "7,'Gutsy Gibbon',7.10,2007-10-18,false",
-      "8,'Hardy Heron',8.04,2008-04-24,true",
-      "9,'Intrepid Ibex',8.10,2008-10-18,false",
-      "10,'Jaunty Jackalope',9.04,2009-04-23,false",
-      "11,'Karmic Koala',9.10,2009-10-29,false",
-      "12,'Lucid Lynx',10.04,2010-04-29,true",
-      "13,'Maverick Meerkat',10.10,2010-10-10,false",
-      "14,'Natty Narwhal',11.04,2011-04-28,false",
-      "15,'Oneiric Ocelot',11.10,2011-10-10,false",
-      "16,'Precise Pangolin',12.04,2012-04-26,true",
-      "17,'Quantal Quetzal',12.10,2012-10-18,false",
-      "18,'Raring Ringtail',13.04,2013-04-25,false",
-      "19,'Saucy Salamander',13.10,2013-10-17,false"
-    );
-
-    // Clean up testing table
-    dropTable();
-  }
+//  private static final Logger LOG = Logger.getLogger(PartitionerTest.class);
+//
+//  /**
+//   * Columns that we will use as partition column with maximal number of
+//   * partitions that can be created for such column.
+//   */
+//  public static Object[] COLUMNS = new Object [][] {
+//    {"id",           13},
+//    {"code_name",    13},
+//    {"version",      13},
+//    {"release_date", 13},
+//    {"lts",           2},
+//  };
+//
+//  /**
+//   * Number of extractors that we will use to transfer the table.
+//   */
+//  public static Object [] EXTRACTORS = new Object[] {
+//    3, 5, 10, 13,
+//  };
+//
+//  @Parameterized.Parameters(name = "{0}-{1}-{2}")
+//  public static Iterable<Object[]> data() {
+//    return ParametrizedUtils.crossProduct(COLUMNS, EXTRACTORS);
+//  }
+//
+//  private String partitionColumn;
+//  private int extractors;
+//  private int maxOutputFiles;
+//
+//  public PartitionerTest(String partitionColumn, int expectedOutputFiles, int extractors)
{
+//    this.partitionColumn = partitionColumn;
+//    this.maxOutputFiles = expectedOutputFiles;
+//    this.extractors = extractors;
+//  }
+//
+//  @Test
+//  public void testSplitter() throws Exception {
+//    createAndLoadTableUbuntuReleases();
+//
+//    // Connection creation
+//    MConnection connection = getClient().newConnection("generic-jdbc-connector");
+//    fillConnectionForm(connection);
+//    createConnection(connection);
+//
+//    // Job creation
+//    MJob job = getClient().newJob(connection.getPersistenceId(), MJob.Type.IMPORT);
+//
+//    // Connector values
+//    MFormList forms = job.getFromPart();
+//    forms.getStringInput("table.tableName").setValue(provider.escapeTableName(getTableName()));
+//    forms.getStringInput("table.partitionColumn").setValue(provider.escapeColumnName(partitionColumn));
+//    // Framework values
+//    fillOutputForm(job, StorageType.HDFS, OutputFormat.TEXT_FILE);
+//    forms = job.getFrameworkPart();
+//    forms.getIntegerInput("throttling.extractors").setValue(extractors);
+//    createJob(job);
+//
+//    runJob(job);
+//
+//    // Assert correct output
+//    assertMapreduceOutputFiles((extractors > maxOutputFiles) ? maxOutputFiles : extractors);
+//    assertMapreduceOutput(
+//      "1,'Warty Warthog',4.10,2004-10-20,false",
+//      "2,'Hoary Hedgehog',5.04,2005-04-08,false",
+//      "3,'Breezy Badger',5.10,2005-10-13,false",
+//      "4,'Dapper Drake',6.06,2006-06-01,true",
+//      "5,'Edgy Eft',6.10,2006-10-26,false",
+//      "6,'Feisty Fawn',7.04,2007-04-19,false",
+//      "7,'Gutsy Gibbon',7.10,2007-10-18,false",
+//      "8,'Hardy Heron',8.04,2008-04-24,true",
+//      "9,'Intrepid Ibex',8.10,2008-10-18,false",
+//      "10,'Jaunty Jackalope',9.04,2009-04-23,false",
+//      "11,'Karmic Koala',9.10,2009-10-29,false",
+//      "12,'Lucid Lynx',10.04,2010-04-29,true",
+//      "13,'Maverick Meerkat',10.10,2010-10-10,false",
+//      "14,'Natty Narwhal',11.04,2011-04-28,false",
+//      "15,'Oneiric Ocelot',11.10,2011-10-10,false",
+//      "16,'Precise Pangolin',12.04,2012-04-26,true",
+//      "17,'Quantal Quetzal',12.10,2012-10-18,false",
+//      "18,'Raring Ringtail',13.04,2013-04-25,false",
+//      "19,'Saucy Salamander',13.10,2013-10-17,false"
+//    );
+//
+//    // Clean up testing table
+//    dropTable();
+//  }
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/d883557d/test/src/test/java/org/apache/sqoop/integration/server/SubmissionWithDisabledModelObjectsTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/server/SubmissionWithDisabledModelObjectsTest.java
b/test/src/test/java/org/apache/sqoop/integration/server/SubmissionWithDisabledModelObjectsTest.java
index 84d1a26..126ca32 100644
--- a/test/src/test/java/org/apache/sqoop/integration/server/SubmissionWithDisabledModelObjectsTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/server/SubmissionWithDisabledModelObjectsTest.java
@@ -44,70 +44,70 @@ import static org.junit.Assert.fail;
 @RunWith(Parameterized.class)
 public class SubmissionWithDisabledModelObjectsTest extends ConnectorTestCase {
 
-  @Parameterized.Parameters(name = "con({0}) job({1})")
-  public static Iterable<Object[]> data() {
-    return Arrays.asList(new Object[][] {
-      { true, false },
-      { false, true },
-      { false, false },
-    });
-  }
-
-  private boolean enabledConnection;
-  private boolean enabledJob;
-
-  public SubmissionWithDisabledModelObjectsTest(boolean enabledConnection, boolean enabledJob)
{
-    this.enabledConnection = enabledConnection;
-    this.enabledJob = enabledJob;
-  }
-
-  @Test
-  public void testWithDisabledObjects() throws Exception {
-    createAndLoadTableCities();
-
-    // Connection creation
-    MConnection connection = getClient().newConnection("generic-jdbc-connector");
-    fillConnectionForm(connection);
-    createConnection(connection);
-
-    // Job creation
-    MJob job = getClient().newJob(connection.getPersistenceId(), MJob.Type.IMPORT);
-
-    // Connector values
-    MFormList forms = job.getConnectorPart();
-    forms.getStringInput("table.tableName").setValue(provider.escapeTableName(getTableName()));
-    forms.getStringInput("table.partitionColumn").setValue(provider.escapeColumnName("id"));
-    // Framework values
-    fillOutputForm(job, StorageType.HDFS, OutputFormat.TEXT_FILE);
-    createJob(job);
-
-    // Disable model entities as per parametrized run
-    getClient().enableConnection(connection.getPersistenceId(), enabledConnection);
-    getClient().enableJob(job.getPersistenceId(), enabledJob);
-
-    // Try to run the job and verify that the it was not executed
-    try {
-      runJob(job);
-      fail("Expected exception as the model classes are disabled.");
-    } catch(SqoopException ex) {
-      // Top level exception should be CLIENT_0001
-      assertEquals(ClientError.CLIENT_0001, ex.getErrorCode());
-
-      // We can directly verify the ErrorCode from SqoopException as client side
-      // is not rebuilding SqoopExceptions per missing ErrorCodes. E.g. the cause
-      // will be generic Throwable and not SqoopException instance.
-      Throwable cause = ex.getCause();
-      assertNotNull(cause);
-
-      if(!enabledJob) {
-        assertTrue(cause.getMessage().startsWith(FrameworkError.FRAMEWORK_0009.toString()));
-      } else if(!enabledConnection) {
-        assertTrue(cause.getMessage().startsWith(FrameworkError.FRAMEWORK_0010.toString()));
-      } else {
-        fail("Unexpected expception retrieved from server " + cause);
-      }
-    } finally {
-      dropTable();
-    }
-  }
+//  @Parameterized.Parameters(name = "con({0}) job({1})")
+//  public static Iterable<Object[]> data() {
+//    return Arrays.asList(new Object[][] {
+//      { true, false },
+//      { false, true },
+//      { false, false },
+//    });
+//  }
+//
+//  private boolean enabledConnection;
+//  private boolean enabledJob;
+//
+//  public SubmissionWithDisabledModelObjectsTest(boolean enabledConnection, boolean enabledJob)
{
+//    this.enabledConnection = enabledConnection;
+//    this.enabledJob = enabledJob;
+//  }
+//
+//  @Test
+//  public void testWithDisabledObjects() throws Exception {
+//    createAndLoadTableCities();
+//
+//    // Connection creation
+//    MConnection connection = getClient().newConnection("generic-jdbc-connector");
+//    fillConnectionForm(connection);
+//    createConnection(connection);
+//
+//    // Job creation
+//    MJob job = getClient().newJob(connection.getPersistenceId(), MJob.Type.IMPORT);
+//
+//    // Connector values
+//    MFormList forms = job.getFromPart();
+//    forms.getStringInput("table.tableName").setValue(provider.escapeTableName(getTableName()));
+//    forms.getStringInput("table.partitionColumn").setValue(provider.escapeColumnName("id"));
+//    // Framework values
+//    fillOutputForm(job, StorageType.HDFS, OutputFormat.TEXT_FILE);
+//    createJob(job);
+//
+//    // Disable model entities as per parametrized run
+//    getClient().enableConnection(connection.getPersistenceId(), enabledConnection);
+//    getClient().enableJob(job.getPersistenceId(), enabledJob);
+//
+//    // Try to run the job and verify that the it was not executed
+//    try {
+//      runJob(job);
+//      fail("Expected exception as the model classes are disabled.");
+//    } catch(SqoopException ex) {
+//      // Top level exception should be CLIENT_0001
+//      assertEquals(ClientError.CLIENT_0001, ex.getErrorCode());
+//
+//      // We can directly verify the ErrorCode from SqoopException as client side
+//      // is not rebuilding SqoopExceptions per missing ErrorCodes. E.g. the cause
+//      // will be generic Throwable and not SqoopException instance.
+//      Throwable cause = ex.getCause();
+//      assertNotNull(cause);
+//
+//      if(!enabledJob) {
+//        assertTrue(cause.getMessage().startsWith(FrameworkError.FRAMEWORK_0009.toString()));
+//      } else if(!enabledConnection) {
+//        assertTrue(cause.getMessage().startsWith(FrameworkError.FRAMEWORK_0010.toString()));
+//      } else {
+//        fail("Unexpected expception retrieved from server " + cause);
+//      }
+//    } finally {
+//      dropTable();
+//    }
+//  }
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/d883557d/test/src/test/java/org/apache/sqoop/integration/server/VersionTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/sqoop/integration/server/VersionTest.java b/test/src/test/java/org/apache/sqoop/integration/server/VersionTest.java
index cea24b9..5ebe95f 100644
--- a/test/src/test/java/org/apache/sqoop/integration/server/VersionTest.java
+++ b/test/src/test/java/org/apache/sqoop/integration/server/VersionTest.java
@@ -32,14 +32,14 @@ public class VersionTest extends TomcatTestCase {
 
   @Test
   public void testVersion() {
-    VersionRequest versionRequest = new VersionRequest();
-    VersionBean versionBean = versionRequest.doGet(getServerUrl());
-
-    assertEquals(versionBean.getVersion(), VersionInfo.getVersion());
-    assertEquals(versionBean.getDate(), VersionInfo.getDate());
-    assertEquals(versionBean.getRevision(), VersionInfo.getRevision());
-    assertEquals(versionBean.getUser(), VersionInfo.getUser());
-    assertEquals(versionBean.getRevision(), VersionInfo.getRevision());
+//    VersionRequest versionRequest = new VersionRequest();
+//    VersionBean versionBean = versionRequest.doGet(getServerUrl());
+//
+//    assertEquals(versionBean.getVersion(), VersionInfo.getVersion());
+//    assertEquals(versionBean.getDate(), VersionInfo.getDate());
+//    assertEquals(versionBean.getRevision(), VersionInfo.getRevision());
+//    assertEquals(versionBean.getUser(), VersionInfo.getUser());
+//    assertEquals(versionBean.getRevision(), VersionInfo.getRevision());
   }
 
 }


Mime
View raw message