5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-16 17:00:53 +08:00

SQOOP-2730: Sqoop2: Integration: Oracle does not support a boolean type, so do not use them in tests

(Abraham Fine via Jarek Jarcec Cecho)
This commit is contained in:
Jarek Jarcec Cecho 2015-12-09 10:47:29 +01:00
parent 3f5b33d0d9
commit 2fc3128d1a
3 changed files with 59 additions and 61 deletions

View File

@ -39,8 +39,7 @@ public DataSet createTables() {
"id", "int", "id", "int",
"code_name", "varchar(64)", "code_name", "varchar(64)",
"version", "numeric(4,2)", "version", "numeric(4,2)",
"release_date", "date", "release_date", "date"
"lts", "boolean"
); );
return this; return this;
@ -48,25 +47,25 @@ public DataSet createTables() {
@Override @Override
public DataSet loadBasicData() { public DataSet loadBasicData() {
provider.insertRow(tableBaseName, 1, "Warty Warthog", 4.10, "2004-10-20", false); provider.insertRow(tableBaseName, 1, "Warty Warthog", 4.10, "2004-10-20");
provider.insertRow(tableBaseName, 2, "Hoary Hedgehog", 5.04, "2005-04-08", false); provider.insertRow(tableBaseName, 2, "Hoary Hedgehog", 5.04, "2005-04-08");
provider.insertRow(tableBaseName, 3, "Breezy Badger", 5.10, "2005-10-13", false); provider.insertRow(tableBaseName, 3, "Breezy Badger", 5.10, "2005-10-13");
provider.insertRow(tableBaseName, 4, "Dapper Drake", 6.06, "2006-06-01", true); provider.insertRow(tableBaseName, 4, "Dapper Drake", 6.06, "2006-06-01");
provider.insertRow(tableBaseName, 5, "Edgy Eft", 6.10, "2006-10-26", false); provider.insertRow(tableBaseName, 5, "Edgy Eft", 6.10, "2006-10-26");
provider.insertRow(tableBaseName, 6, "Feisty Fawn", 7.04, "2007-04-19", false); provider.insertRow(tableBaseName, 6, "Feisty Fawn", 7.04, "2007-04-19");
provider.insertRow(tableBaseName, 7, "Gutsy Gibbon", 7.10, "2007-10-18", false); provider.insertRow(tableBaseName, 7, "Gutsy Gibbon", 7.10, "2007-10-18");
provider.insertRow(tableBaseName, 8, "Hardy Heron", 8.04, "2008-04-24", true); provider.insertRow(tableBaseName, 8, "Hardy Heron", 8.04, "2008-04-24");
provider.insertRow(tableBaseName, 9, "Intrepid Ibex", 8.10, "2008-10-18", false); provider.insertRow(tableBaseName, 9, "Intrepid Ibex", 8.10, "2008-10-18");
provider.insertRow(tableBaseName, 10, "Jaunty Jackalope", 9.04, "2009-04-23", false); provider.insertRow(tableBaseName, 10, "Jaunty Jackalope", 9.04, "2009-04-23");
provider.insertRow(tableBaseName, 11, "Karmic Koala", 9.10, "2009-10-29", false); provider.insertRow(tableBaseName, 11, "Karmic Koala", 9.10, "2009-10-29");
provider.insertRow(tableBaseName, 12, "Lucid Lynx", 10.04, "2010-04-29", true); provider.insertRow(tableBaseName, 12, "Lucid Lynx", 10.04, "2010-04-29");
provider.insertRow(tableBaseName, 13, "Maverick Meerkat",10.10, "2010-10-10", false); provider.insertRow(tableBaseName, 13, "Maverick Meerkat",10.10, "2010-10-10");
provider.insertRow(tableBaseName, 14, "Natty Narwhal", 11.04, "2011-04-28", false); provider.insertRow(tableBaseName, 14, "Natty Narwhal", 11.04, "2011-04-28");
provider.insertRow(tableBaseName, 15, "Oneiric Ocelot", 11.10, "2011-10-10", false); provider.insertRow(tableBaseName, 15, "Oneiric Ocelot", 11.10, "2011-10-10");
provider.insertRow(tableBaseName, 16, "Precise Pangolin",12.04, "2012-04-26", true); provider.insertRow(tableBaseName, 16, "Precise Pangolin",12.04, "2012-04-26");
provider.insertRow(tableBaseName, 17, "Quantal Quetzal", 12.10, "2012-10-18", false); provider.insertRow(tableBaseName, 17, "Quantal Quetzal", 12.10, "2012-10-18");
provider.insertRow(tableBaseName, 18, "Raring Ringtail", 13.04, "2013-04-25", false); provider.insertRow(tableBaseName, 18, "Raring Ringtail", 13.04, "2013-04-25");
provider.insertRow(tableBaseName, 19, "Saucy Salamander",13.10, "2013-10-17", false); provider.insertRow(tableBaseName, 19, "Saucy Salamander",13.10, "2013-10-17");
return this; return this;
} }

View File

@ -107,16 +107,16 @@ public void testTable() throws Exception {
// Assert correct output // Assert correct output
assertTo( assertTo(
"10,'Jaunty Jackalope',9.04,'2009-04-23',false", "10,'Jaunty Jackalope',9.04,'2009-04-23'",
"11,'Karmic Koala',9.10,'2009-10-29',false", "11,'Karmic Koala',9.10,'2009-10-29'",
"12,'Lucid Lynx',10.04,'2010-04-29',true", "12,'Lucid Lynx',10.04,'2010-04-29'",
"13,'Maverick Meerkat',10.10,'2010-10-10',false", "13,'Maverick Meerkat',10.10,'2010-10-10'",
"14,'Natty Narwhal',11.04,'2011-04-28',false", "14,'Natty Narwhal',11.04,'2011-04-28'",
"15,'Oneiric Ocelot',11.10,'2011-10-10',false", "15,'Oneiric Ocelot',11.10,'2011-10-10'",
"16,'Precise Pangolin',12.04,'2012-04-26',true", "16,'Precise Pangolin',12.04,'2012-04-26'",
"17,'Quantal Quetzal',12.10,'2012-10-18',false", "17,'Quantal Quetzal',12.10,'2012-10-18'",
"18,'Raring Ringtail',13.04,'2013-04-25',false", "18,'Raring Ringtail',13.04,'2013-04-25'",
"19,'Saucy Salamander',13.10,'2013-10-17',false" "19,'Saucy Salamander',13.10,'2013-10-17'"
); );
// Verify new last value // Verify new last value
@ -162,16 +162,16 @@ public void testQuery() throws Exception {
// Assert correct output // Assert correct output
assertTo( assertTo(
"10,'Jaunty Jackalope',9.04,'2009-04-23',false", "10,'Jaunty Jackalope',9.04,'2009-04-23'",
"11,'Karmic Koala',9.10,'2009-10-29',false", "11,'Karmic Koala',9.10,'2009-10-29'",
"12,'Lucid Lynx',10.04,'2010-04-29',true", "12,'Lucid Lynx',10.04,'2010-04-29'",
"13,'Maverick Meerkat',10.10,'2010-10-10',false", "13,'Maverick Meerkat',10.10,'2010-10-10'",
"14,'Natty Narwhal',11.04,'2011-04-28',false", "14,'Natty Narwhal',11.04,'2011-04-28'",
"15,'Oneiric Ocelot',11.10,'2011-10-10',false", "15,'Oneiric Ocelot',11.10,'2011-10-10'",
"16,'Precise Pangolin',12.04,'2012-04-26',true", "16,'Precise Pangolin',12.04,'2012-04-26'",
"17,'Quantal Quetzal',12.10,'2012-10-18',false", "17,'Quantal Quetzal',12.10,'2012-10-18'",
"18,'Raring Ringtail',13.04,'2013-04-25',false", "18,'Raring Ringtail',13.04,'2013-04-25'",
"19,'Saucy Salamander',13.10,'2013-10-17',false" "19,'Saucy Salamander',13.10,'2013-10-17'"
); );
// Verify new last value // Verify new last value

View File

@ -46,7 +46,6 @@ public class PartitionerTest extends ConnectorTestCase implements ITest {
{"code_name", 13}, {"code_name", 13},
{"version", 13}, {"version", 13},
{"release_date", 13}, {"release_date", 13},
{"lts", 2},
}; };
/** /**
@ -111,25 +110,25 @@ public void testSplitter() throws Exception {
// Assert correct output // Assert correct output
assertToFiles((extractors > maxOutputFiles) ? maxOutputFiles : extractors); assertToFiles((extractors > maxOutputFiles) ? maxOutputFiles : extractors);
assertTo( assertTo(
"1,'Warty Warthog',4.10,'2004-10-20',false", "1,'Warty Warthog',4.10,'2004-10-20'",
"2,'Hoary Hedgehog',5.04,'2005-04-08',false", "2,'Hoary Hedgehog',5.04,'2005-04-08'",
"3,'Breezy Badger',5.10,'2005-10-13',false", "3,'Breezy Badger',5.10,'2005-10-13'",
"4,'Dapper Drake',6.06,'2006-06-01',true", "4,'Dapper Drake',6.06,'2006-06-01'",
"5,'Edgy Eft',6.10,'2006-10-26',false", "5,'Edgy Eft',6.10,'2006-10-26'",
"6,'Feisty Fawn',7.04,'2007-04-19',false", "6,'Feisty Fawn',7.04,'2007-04-19'",
"7,'Gutsy Gibbon',7.10,'2007-10-18',false", "7,'Gutsy Gibbon',7.10,'2007-10-18'",
"8,'Hardy Heron',8.04,'2008-04-24',true", "8,'Hardy Heron',8.04,'2008-04-24'",
"9,'Intrepid Ibex',8.10,'2008-10-18',false", "9,'Intrepid Ibex',8.10,'2008-10-18'",
"10,'Jaunty Jackalope',9.04,'2009-04-23',false", "10,'Jaunty Jackalope',9.04,'2009-04-23'",
"11,'Karmic Koala',9.10,'2009-10-29',false", "11,'Karmic Koala',9.10,'2009-10-29'",
"12,'Lucid Lynx',10.04,'2010-04-29',true", "12,'Lucid Lynx',10.04,'2010-04-29'",
"13,'Maverick Meerkat',10.10,'2010-10-10',false", "13,'Maverick Meerkat',10.10,'2010-10-10'",
"14,'Natty Narwhal',11.04,'2011-04-28',false", "14,'Natty Narwhal',11.04,'2011-04-28'",
"15,'Oneiric Ocelot',11.10,'2011-10-10',false", "15,'Oneiric Ocelot',11.10,'2011-10-10'",
"16,'Precise Pangolin',12.04,'2012-04-26',true", "16,'Precise Pangolin',12.04,'2012-04-26'",
"17,'Quantal Quetzal',12.10,'2012-10-18',false", "17,'Quantal Quetzal',12.10,'2012-10-18'",
"18,'Raring Ringtail',13.04,'2013-04-25',false", "18,'Raring Ringtail',13.04,'2013-04-25'",
"19,'Saucy Salamander',13.10,'2013-10-17',false" "19,'Saucy Salamander',13.10,'2013-10-17'"
); );
// Clean up testing table // Clean up testing table