5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-06 23:50:35 +08:00

SQOOP-2405: Sqoop2: Remove active wait in test cases after executeJob() call

(Banmeet Singh via Abraham Elmahrek)
This commit is contained in:
Abraham Elmahrek 2015-06-26 10:45:16 -07:00
parent 4a5bd295d8
commit 7edaa11d22

View File

@ -103,14 +103,6 @@ public void testStories() throws Exception {
executeJob(job); executeJob(job);
// Wait until the job finish - this active waiting will be removed once
// Sqoop client API will get blocking support.
MSubmission submission;
do {
Thread.sleep(5000);
submission = getClient().getJobStatus(job.getPersistenceId());
} while(submission.getStatus().isRunning());
// Assert correct output // Assert correct output
assertTo( assertTo(
"1,'The Gift of the Magi','ONE DOLLAR AND EIGHTY-SEVEN CENTS. THAT WAS ALL. AND SIXTY CENTS of it was in pennies. Pennies saved one and two at a time by bulldozing the grocer and the vegetable man and the butcher until ones cheeks burned with the silent imputation of parsimony that such close dealing implied. Three times Della counted it. One dollar and eighty-seven cents. And the next day would be Christmas.\\n\\nThere was clearly nothing left to do but flop down on the shabby little couch and howl. So Della did it. Which instigates the moral reflection that life is made up of sobs, sniffles, and smiles, with sniffles predominating.'", "1,'The Gift of the Magi','ONE DOLLAR AND EIGHTY-SEVEN CENTS. THAT WAS ALL. AND SIXTY CENTS of it was in pennies. Pennies saved one and two at a time by bulldozing the grocer and the vegetable man and the butcher until ones cheeks burned with the silent imputation of parsimony that such close dealing implied. Three times Della counted it. One dollar and eighty-seven cents. And the next day would be Christmas.\\n\\nThere was clearly nothing left to do but flop down on the shabby little couch and howl. So Della did it. Which instigates the moral reflection that life is made up of sobs, sniffles, and smiles, with sniffles predominating.'",
@ -149,14 +141,6 @@ public void testColumns() throws Exception {
executeJob(job); executeJob(job);
// Wait until the job finish - this active waiting will be removed once
// Sqoop client API will get blocking support.
MSubmission submission;
do {
Thread.sleep(5000);
submission = getClient().getJobStatus(job.getPersistenceId());
} while(submission.getStatus().isRunning());
// Assert correct output // Assert correct output
assertTo( assertTo(
"1,'USA'", "1,'USA'",
@ -197,14 +181,6 @@ public void testSql() throws Exception {
executeJob(job); executeJob(job);
// Wait until the job finish - this active waiting will be removed once
// Sqoop client API will get blocking support.
MSubmission submission;
do {
Thread.sleep(5000);
submission = getClient().getJobStatus(job.getPersistenceId());
} while(submission.getStatus().isRunning());
// Assert correct output // Assert correct output
assertTo( assertTo(
"1", "1",
@ -251,14 +227,6 @@ public void testDuplicateColumns() throws Exception {
executeJob(job); executeJob(job);
// Wait until the job finish - this active waiting will be removed once
// Sqoop client API will get blocking support.
MSubmission submission;
do {
Thread.sleep(5000);
submission = getClient().getJobStatus(job.getPersistenceId());
} while(submission.getStatus().isRunning());
// Assert correct output // Assert correct output
assertTo( assertTo(
"1,1", "1,1",