mirror of
https://github.com/apache/sqoop.git
synced 2025-05-16 17:00:53 +08:00
SQOOP-821: Hadoop has changed logic for job id in LocalJobRunner that
breaks Lob* tests (Jarek Jarcec Cecho via Cheolsoo Park)
This commit is contained in:
parent
82c117c4f1
commit
fea72de6e6
@ -200,10 +200,12 @@ public void testBlobAvroImportExternal() throws IOException, SQLException {
|
||||
// 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 void testBlobAvroImportExternal() throws IOException, SQLException {
|
||||
assertEquals(chars, data.length());
|
||||
|
||||
returnVal = new String(bufArray);
|
||||
expectedVal = data;
|
||||
String expectedVal = data;
|
||||
|
||||
assertEquals(getColName(0), returnVal, expectedVal);
|
||||
}
|
||||
@ -286,10 +288,12 @@ public void testBlobCompressedAvroImportExternal()
|
||||
// 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 void testBlobCompressedAvroImportExternal()
|
||||
assertEquals(chars, data.length());
|
||||
|
||||
returnVal = new String(bufArray);
|
||||
expectedVal = data;
|
||||
String expectedVal = data;
|
||||
|
||||
assertEquals(getColName(0), returnVal, expectedVal);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user