sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject git commit: SQOOP-790: Remove flakiness from TestSqoopOutputformatLoadExecutor
Date Wed, 19 Dec 2012 02:24:47 GMT
Updated Branches:
  refs/heads/sqoop2 a673362bc -> 7fe248bc8


SQOOP-790: Remove flakiness from TestSqoopOutputformatLoadExecutor

(Hari Shreedharan via Jarek Jarcec Cecho)


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

Branch: refs/heads/sqoop2
Commit: 7fe248bc83a5df3467ee850d2325470dd511794d
Parents: a673362
Author: Jarek Jarcec Cecho <jarcec@apache.org>
Authored: Tue Dec 18 18:23:58 2012 -0800
Committer: Jarek Jarcec Cecho <jarcec@apache.org>
Committed: Tue Dec 18 18:23:58 2012 -0800

----------------------------------------------------------------------
 .../job/mr/TestSqoopOutputFormatLoadExecutor.java  |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/7fe248bc/execution/mapreduce/src/test/java/org/apache/sqoop/job/mr/TestSqoopOutputFormatLoadExecutor.java
----------------------------------------------------------------------
diff --git a/execution/mapreduce/src/test/java/org/apache/sqoop/job/mr/TestSqoopOutputFormatLoadExecutor.java
b/execution/mapreduce/src/test/java/org/apache/sqoop/job/mr/TestSqoopOutputFormatLoadExecutor.java
index c99b2c0..1a300ae 100644
--- a/execution/mapreduce/src/test/java/org/apache/sqoop/job/mr/TestSqoopOutputFormatLoadExecutor.java
+++ b/execution/mapreduce/src/test/java/org/apache/sqoop/job/mr/TestSqoopOutputFormatLoadExecutor.java
@@ -33,6 +33,7 @@ import org.junit.Test;
 
 import java.util.ConcurrentModificationException;
 import java.util.concurrent.BrokenBarrierException;
+import java.util.concurrent.TimeUnit;
 
 public class TestSqoopOutputFormatLoadExecutor {
 
@@ -165,10 +166,8 @@ public class TestSqoopOutputFormatLoadExecutor {
     writer.close(null);
   }
 
-  @Test
+  @Test (expected = SqoopException.class)
   public void testSuccessfulLoader() throws Throwable {
-    conf.set(JobConstants.JOB_TYPE, "EXPORT");
-    conf.set(JobConstants.JOB_ETL_LOADER, GoodLoader.class.getName());
     SqoopOutputFormatLoadExecutor executor = new
         SqoopOutputFormatLoadExecutor(true, GoodLoader.class.getName());
     RecordWriter<Data, NullWritable> writer = executor.getRecordWriter();
@@ -182,6 +181,8 @@ public class TestSqoopOutputFormatLoadExecutor {
     }
     data.setContent(builder.toString(), Data.CSV_RECORD);
     writer.write(data, null);
+    //Allow writer to complete.
+    TimeUnit.SECONDS.sleep(5);
     writer.close(null);
   }
 


Mime
View raw message