sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From venkatran...@apache.org
Subject sqoop git commit: SQOOP-2950: Sqoop trunk has consistent UT failures - need fixing (Venkat Ranganathan via Venkat Ranganathan)
Date Mon, 13 Jun 2016 16:08:52 GMT
Repository: sqoop
Updated Branches:
  refs/heads/trunk b302d89fa -> c339b23b6


SQOOP-2950: Sqoop trunk has consistent UT failures - need fixing
  (Venkat Ranganathan via Venkat Ranganathan)


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

Branch: refs/heads/trunk
Commit: c339b23b6c1f86beab40e1332494f68286a35c90
Parents: b302d89
Author: Venkat Ranganathan <venkat@hortonworks.com>
Authored: Mon Jun 13 17:29:02 2016 +0530
Committer: Venkat Ranganathan <venkat@hortonworks.com>
Committed: Mon Jun 13 17:29:02 2016 +0530

----------------------------------------------------------------------
 src/test/com/cloudera/sqoop/TestAvroExport.java         | 8 ++++----
 src/test/com/cloudera/sqoop/TestAvroImport.java         | 4 ++--
 src/test/com/cloudera/sqoop/TestExport.java             | 2 +-
 src/test/com/cloudera/sqoop/TestParquetExport.java      | 4 ++--
 src/test/org/apache/sqoop/TestExportUsingProcedure.java | 5 ++---
 5 files changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/c339b23b/src/test/com/cloudera/sqoop/TestAvroExport.java
----------------------------------------------------------------------
diff --git a/src/test/com/cloudera/sqoop/TestAvroExport.java b/src/test/com/cloudera/sqoop/TestAvroExport.java
index 02db6c0..b513138 100644
--- a/src/test/com/cloudera/sqoop/TestAvroExport.java
+++ b/src/test/com/cloudera/sqoop/TestAvroExport.java
@@ -240,11 +240,11 @@ public class TestAvroExport extends ExportJobTestCase {
     StringBuilder sb = new StringBuilder();
     sb.append("CREATE TABLE ");
     sb.append(getTableName());
-    sb.append(" (\"id\" INT NOT NULL PRIMARY KEY, \"msg\" VARCHAR(64)");
+    sb.append(" (id INT NOT NULL PRIMARY KEY, msg VARCHAR(64)");
     int colNum = 0;
     for (ColumnGenerator gen : extraColumns) {
       if (gen.getColumnType() != null) {
-        sb.append(", \"" + forIdx(colNum++) + "\" " + gen.getColumnType());
+        sb.append(", " + forIdx(colNum++)  + " " + gen.getColumnType());
       }
     }
     sb.append(")");
@@ -301,7 +301,7 @@ public class TestAvroExport extends ExportJobTestCase {
     LOG.info("Verifying column " + colName + " has value " + expectedVal);
 
     PreparedStatement statement = conn.prepareStatement(
-        "SELECT \"" + colName + "\" FROM " + getTableName() + " WHERE \"id\" = " + id,
+        "SELECT " + colName + " FROM " + getTableName() + " WHERE ID = " + id,
         ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
     Object actualVal = null;
     try {
@@ -511,7 +511,7 @@ public class TestAvroExport extends ExportJobTestCase {
     };
     createAvroFile(0, TOTAL_RECORDS, gens);
     createTable(gens);
-    runExport(getArgv(true, 10, 10, newStrArray(null, "-m", "" + 1, "--columns", "id,msg,col1,col2")));
+    runExport(getArgv(true, 10, 10, newStrArray(null, "-m", "" + 1, "--columns", "ID,MSG,COL1,COL2")));
     verifyExport(TOTAL_RECORDS);
     assertColValForRowId(0, "col0", null);
     assertColValForRowId(0, "col1", 111);

http://git-wip-us.apache.org/repos/asf/sqoop/blob/c339b23b/src/test/com/cloudera/sqoop/TestAvroImport.java
----------------------------------------------------------------------
diff --git a/src/test/com/cloudera/sqoop/TestAvroImport.java b/src/test/com/cloudera/sqoop/TestAvroImport.java
index b611627..0a64b52 100644
--- a/src/test/com/cloudera/sqoop/TestAvroImport.java
+++ b/src/test/com/cloudera/sqoop/TestAvroImport.java
@@ -228,10 +228,10 @@ public class TestAvroImport extends ImportJobTestCase {
     List<Field> fields = schema.getFields();
     assertEquals(types.length, fields.size());
 
-    checkField(fields.get(0), "AVRO_1", Type.INT);
+    checkField(fields.get(0), "AVRO\uC3A11", Type.INT);
 
     GenericRecord record1 = reader.next();
-    assertEquals("AVRO_1", 1987, record1.get("AVRO_1"));
+    assertEquals("AVRO\uC3A11", 1987, record1.get("AVRO\uC3A11"));
   }
 
   public void testNonIdentCharactersInColumnName() throws IOException {

http://git-wip-us.apache.org/repos/asf/sqoop/blob/c339b23b/src/test/com/cloudera/sqoop/TestExport.java
----------------------------------------------------------------------
diff --git a/src/test/com/cloudera/sqoop/TestExport.java b/src/test/com/cloudera/sqoop/TestExport.java
index 62e4a64..f9bc27e 100644
--- a/src/test/com/cloudera/sqoop/TestExport.java
+++ b/src/test/com/cloudera/sqoop/TestExport.java
@@ -249,7 +249,7 @@ public class TestExport extends ExportJobTestCase {
    *  @return the name of the column
    */
   protected String forIdx(int idx) {
-    return "col" + idx;
+    return "COL" + idx;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/sqoop/blob/c339b23b/src/test/com/cloudera/sqoop/TestParquetExport.java
----------------------------------------------------------------------
diff --git a/src/test/com/cloudera/sqoop/TestParquetExport.java b/src/test/com/cloudera/sqoop/TestParquetExport.java
index 0c94248..c6ddef6 100644
--- a/src/test/com/cloudera/sqoop/TestParquetExport.java
+++ b/src/test/com/cloudera/sqoop/TestParquetExport.java
@@ -217,7 +217,7 @@ public class TestParquetExport extends ExportJobTestCase {
     StringBuilder sb = new StringBuilder();
     sb.append("CREATE TABLE ");
     sb.append(getTableName());
-    sb.append(" (\"id\" INT NOT NULL PRIMARY KEY, \"msg\" VARCHAR(64)");
+    sb.append(" (\"ID\" INT NOT NULL PRIMARY KEY, \"MSG\" VARCHAR(64)");
     int colNum = 0;
     for (ColumnGenerator gen : extraColumns) {
       if (gen.getColumnType() != null) {
@@ -277,7 +277,7 @@ public class TestParquetExport extends ExportJobTestCase {
     LOG.info("Verifying column " + colName + " has value " + expectedVal);
 
     PreparedStatement statement = conn.prepareStatement(
-        "SELECT \"" + colName + "\" FROM " + getTableName() + " WHERE \"id\" = " + id,
+        "SELECT \"" + colName + "\" FROM " + getTableName() + " WHERE \"ID\" = " + id,
         ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
     Object actualVal = null;
     try {

http://git-wip-us.apache.org/repos/asf/sqoop/blob/c339b23b/src/test/org/apache/sqoop/TestExportUsingProcedure.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/sqoop/TestExportUsingProcedure.java b/src/test/org/apache/sqoop/TestExportUsingProcedure.java
index 6509124..cf5e2cd 100644
--- a/src/test/org/apache/sqoop/TestExportUsingProcedure.java
+++ b/src/test/org/apache/sqoop/TestExportUsingProcedure.java
@@ -235,11 +235,10 @@ public class TestExportUsingProcedure extends TestExport {
 
     StringBuilder sql = new StringBuilder("insert into ");
     sql.append(instanceForProcedure.getTableName());
-    sql.append("(\"id\", \"msg\"");
+    sql.append("(id, msg");
     for (int i = 0; i < instanceForProcedure.names.length; ++i) {
-      sql.append(", \"");
+      sql.append(",");
       sql.append(instanceForProcedure.names[i]);
-      sql.append("\"");
     }
     sql.append(") values (");
     for (int i = 0; i < instanceForProcedure.names.length + 2; ++i) {


Mime
View raw message