sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject sqoop git commit: SQOOP-2915: Fixing Oracle related unit tests
Date Tue, 26 Apr 2016 20:42:07 GMT
Repository: sqoop
Updated Branches:
  refs/heads/trunk 660f3e8ad -> db8c24700


SQOOP-2915: Fixing Oracle related unit tests

(Attila Szabo via Jarek Jarcec Cecho)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/db8c2470
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/db8c2470
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/db8c2470

Branch: refs/heads/trunk
Commit: db8c2470002563441c376fa75e05ea1eaad51f22
Parents: 660f3e8
Author: Jarek Jarcec Cecho <jarcec@apache.org>
Authored: Tue Apr 26 13:41:39 2016 -0700
Committer: Jarek Jarcec Cecho <jarcec@apache.org>
Committed: Tue Apr 26 13:41:39 2016 -0700

----------------------------------------------------------------------
 .../sqoop/manager/OracleExportTest.java         |  4 +--
 .../com/cloudera/sqoop/manager/OracleUtils.java |  2 +-
 .../apache/sqoop/manager/oracle/ExportTest.java |  6 ++---
 .../manager/oracle/OracleCallExportTest.java    | 28 ++++++++++----------
 .../sqoop/manager/oracle/TimestampDataTest.java |  2 +-
 5 files changed, 21 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/db8c2470/src/test/com/cloudera/sqoop/manager/OracleExportTest.java
----------------------------------------------------------------------
diff --git a/src/test/com/cloudera/sqoop/manager/OracleExportTest.java b/src/test/com/cloudera/sqoop/manager/OracleExportTest.java
index 7ee3d94..e716510 100644
--- a/src/test/com/cloudera/sqoop/manager/OracleExportTest.java
+++ b/src/test/com/cloudera/sqoop/manager/OracleExportTest.java
@@ -271,10 +271,10 @@ public class OracleExportTest extends TestExport {
     createTable();
     // first time will be insert.
     runExport(getArgv(true, 10, 10, newStrArray(null,
-        "--update-key", "ID", "--update-mode", "allowinsert")));
+        "--update-key", "id", "--update-mode", "allowinsert")));
     // second time will be update.
     runExport(getArgv(true, 10, 10, newStrArray(null,
-        "--update-key", "ID", "--update-mode", "allowinsert")));
+        "--update-key", "id", "--update-mode", "allowinsert")));
     verifyExport(TOTAL_RECORDS);
   }
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/db8c2470/src/test/com/cloudera/sqoop/manager/OracleUtils.java
----------------------------------------------------------------------
diff --git a/src/test/com/cloudera/sqoop/manager/OracleUtils.java b/src/test/com/cloudera/sqoop/manager/OracleUtils.java
index 655aa61..e99dfa9 100644
--- a/src/test/com/cloudera/sqoop/manager/OracleUtils.java
+++ b/src/test/com/cloudera/sqoop/manager/OracleUtils.java
@@ -45,7 +45,7 @@ public final class OracleUtils {
   public static final String ORACLE_SECONDARY_USER_PASS = "ABCDEF";
 
   public static final String ORACLE_INVALID_USER_NAME = "invalidusr";
-  public static final String SYSTEMTEST_TABLE_NAME = "oraoop_test";
+  public static final String SYSTEMTEST_TABLE_NAME = "ORAOOP_TEST";
   public static final int SYSTEMTEST_NUM_ROWS = 100;
   public static final int INTEGRATIONTEST_NUM_ROWS = 10000;
   // Number of mappers if wanting to override default setting

http://git-wip-us.apache.org/repos/asf/sqoop/blob/db8c2470/src/test/org/apache/sqoop/manager/oracle/ExportTest.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/sqoop/manager/oracle/ExportTest.java b/src/test/org/apache/sqoop/manager/oracle/ExportTest.java
index 80b6536..991b221 100644
--- a/src/test/org/apache/sqoop/manager/oracle/ExportTest.java
+++ b/src/test/org/apache/sqoop/manager/oracle/ExportTest.java
@@ -40,21 +40,21 @@ public class ExportTest extends OraOopTestCase {
     TEST_CASE.createTable("table_tst_product.xml");
 
     int retCode =
-        TEST_CASE.runImport("tst_product", TEST_CASE.getSqoopConf(), false);
+ TEST_CASE.runImport("TST_PRODUCT", TEST_CASE.getSqoopConf(), false);
     Assert.assertEquals("Return code should be 0", 0, retCode);
   }
 
   @Test
   public void testProductExport() throws Exception {
     int retCode =
-        TEST_CASE.runExportFromTemplateTable("tst_product", "tst_product_exp");
+        TEST_CASE.runExportFromTemplateTable("TST_PRODUCT", "TST_PRODUCT_EXP");
     Assert.assertEquals("Return code should be 0", 0, retCode);
   }
 
   @Test
   public void testProductExportMixedCaseTableName() throws Exception {
     int retCode =
-        TEST_CASE.runExportFromTemplateTable("tst_product",
+        TEST_CASE.runExportFromTemplateTable("TST_PRODUCT",
             "\"\"T5+_Pr#duct_Exp\"\"");
     Assert.assertEquals("Return code should be 0", 0, retCode);
   }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/db8c2470/src/test/org/apache/sqoop/manager/oracle/OracleCallExportTest.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/sqoop/manager/oracle/OracleCallExportTest.java b/src/test/org/apache/sqoop/manager/oracle/OracleCallExportTest.java
index 44b2f9a..431df0f 100644
--- a/src/test/org/apache/sqoop/manager/oracle/OracleCallExportTest.java
+++ b/src/test/org/apache/sqoop/manager/oracle/OracleCallExportTest.java
@@ -90,23 +90,23 @@ public class OracleCallExportTest extends ExportJobTestCase {
   private void createObjects() {
 
     String createTableSql = "CREATE TABLE " + tableName + " ( "
-      + "id  INT NOT NULL PRIMARY KEY, "
-      + "msg VARCHAR(24) NOT NULL, "
-      + "d DATE, "
-      + "f FLOAT, "
-      + "vc VARCHAR(32))";
+      + "\"id\"  INT NOT NULL PRIMARY KEY, "
+      + "\"msg\" VARCHAR(24) NOT NULL, "
+      + "\"d\" DATE, "
+      + "\"f\" FLOAT, "
+      + "\"vc\" VARCHAR(32))";
 
     String createProcSql = "CREATE PROCEDURE " + procName + " ( "
-      + "id IN INT,"
-      + "msg IN VARCHAR,"
-      + "d IN DATE,"
-      + "f IN FLOAT) IS BEGIN "
+      + "\"id\" IN INT,"
+      + "\"msg\" IN VARCHAR,"
+      + "\"d\" IN DATE,"
+      + "\"f\" IN FLOAT) IS BEGIN "
       + "INSERT INTO " + tableName + " "
-      + "VALUES(id,"
-      + "msg,"
-      + "d,"
-      + "f,"
-      + "msg || '_2'); END;";
+      + "VALUES(\"id\","
+      + "\"msg\","
+      + "\"d\","
+      + "\"f\","
+      + "\"msg\" || '_2'); END;";
 
     try {
       dropTableIfExists(tableName);

http://git-wip-us.apache.org/repos/asf/sqoop/blob/db8c2470/src/test/org/apache/sqoop/manager/oracle/TimestampDataTest.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/sqoop/manager/oracle/TimestampDataTest.java b/src/test/org/apache/sqoop/manager/oracle/TimestampDataTest.java
index f338595..6ceccd1 100644
--- a/src/test/org/apache/sqoop/manager/oracle/TimestampDataTest.java
+++ b/src/test/org/apache/sqoop/manager/oracle/TimestampDataTest.java
@@ -39,7 +39,7 @@ public class TimestampDataTest extends OraOopTestCase {
     sqoopConf.setBoolean(OraOopConstants.ORAOOP_MAP_TIMESTAMP_AS_STRING, false);
 
     try {
-      int retCode = runImport("tst_product", sqoopConf, false);
+      int retCode = runImport("TST_PRODUCT", sqoopConf, false);
       Assert.assertEquals("Return code should be 0", 0, retCode);
 
     } finally {


Mime
View raw message