sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cheol...@apache.org
Subject git commit: SQOOP-821: Hadoop has changed logic for job id in LocalJobRunner that breaks Lob* tests
Date Wed, 09 Jan 2013 19:37:48 GMT
Updated Branches:
  refs/heads/trunk 82c117c4f -> fea72de6e


SQOOP-821: Hadoop has changed logic for job id in LocalJobRunner that
breaks Lob* tests

(Jarek Jarcec Cecho via Cheolsoo Park)


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

Branch: refs/heads/trunk
Commit: fea72de6e6f61f5849d991b385009e730a3d0694
Parents: 82c117c
Author: Cheolsoo Park <cheolsoo@apache.org>
Authored: Wed Jan 9 11:36:51 2013 -0800
Committer: Cheolsoo Park <cheolsoo@apache.org>
Committed: Wed Jan 9 11:36:51 2013 -0800

----------------------------------------------------------------------
 .../sqoop/testutil/LobAvroImportTestCase.java      |   20 +++++++++------
 1 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/fea72de6/src/test/com/cloudera/sqoop/testutil/LobAvroImportTestCase.java
----------------------------------------------------------------------
diff --git a/src/test/com/cloudera/sqoop/testutil/LobAvroImportTestCase.java b/src/test/com/cloudera/sqoop/testutil/LobAvroImportTestCase.java
index e22a6b4..26a4e5b 100644
--- a/src/test/com/cloudera/sqoop/testutil/LobAvroImportTestCase.java
+++ b/src/test/com/cloudera/sqoop/testutil/LobAvroImportTestCase.java
@@ -200,10 +200,12 @@ public abstract class LobAvroImportTestCase extends ImportJobTestCase
{
     // Verify that the reference file is written in Avro bytes.
     ByteBuffer buf = (ByteBuffer) record.get(getColName(0));
     String returnVal = new String(buf.array());
-    String expectedVal = "externalLob(lf,_lob/large_obj_task_local_000"
-        + getTableNum() + "_m_0000000.lob,68," + data.length() + ")";
+    String expectedStart = "externalLob(lf,_lob/large_obj";
+    String expectedEnd = getTableNum() + "_m_0000000.lob,68,"
+      + data.length() + ")";
 
-    assertEquals(expectedVal, returnVal);
+    assertTrue(returnVal.startsWith(expectedStart));
+    assertTrue(returnVal.endsWith(expectedEnd));
 
     // Verify that blob data stored in the external lob file is correct.
     BlobRef br = BlobRef.parse(returnVal);
@@ -217,7 +219,7 @@ public abstract class LobAvroImportTestCase extends ImportJobTestCase
{
     assertEquals(chars, data.length());
 
     returnVal = new String(bufArray);
-    expectedVal = data;
+    String expectedVal = data;
 
     assertEquals(getColName(0), returnVal, expectedVal);
   }
@@ -286,10 +288,12 @@ public abstract class LobAvroImportTestCase extends ImportJobTestCase
{
     // Verify that the reference file is written in Avro bytes.
     ByteBuffer buf = (ByteBuffer) record.get(getColName(0));
     String returnVal = new String(buf.array());
-    String expectedVal = "externalLob(lf,_lob/large_obj_task_local_000"
-        + getTableNum() + "_m_0000000.lob,68," + data.length() + ")";
+    String expectedStart = "externalLob(lf,_lob/large_obj";
+    String expectedEnd = getTableNum() + "_m_0000000.lob,68,"
+      + data.length() + ")";
 
-    assertEquals(expectedVal, returnVal);
+    assertTrue(returnVal.startsWith(expectedStart));
+    assertTrue(returnVal.endsWith(expectedEnd));
 
     // Verify that blob data stored in the external lob file is correct.
     BlobRef br = BlobRef.parse(returnVal);
@@ -303,7 +307,7 @@ public abstract class LobAvroImportTestCase extends ImportJobTestCase
{
     assertEquals(chars, data.length());
 
     returnVal = new String(bufArray);
-    expectedVal = data;
+    String expectedVal = data;
 
     assertEquals(getColName(0), returnVal, expectedVal);
   }


Mime
View raw message