mirror of
https://github.com/apache/sqoop.git
synced 2025-05-04 03:11:00 +08:00
SQOOP-790: Remove flakiness from TestSqoopOutputformatLoadExecutor
(Hari Shreedharan via Jarek Jarcec Cecho)
This commit is contained in:
parent
b2cc3a26fa
commit
065618b000
@ -33,6 +33,7 @@
|
||||
|
||||
import java.util.ConcurrentModificationException;
|
||||
import java.util.concurrent.BrokenBarrierException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class TestSqoopOutputFormatLoadExecutor {
|
||||
|
||||
@ -165,10 +166,8 @@ public void testSuccessfulContinuousLoader() throws Throwable {
|
||||
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 void testSuccessfulLoader() throws Throwable {
|
||||
}
|
||||
data.setContent(builder.toString(), Data.CSV_RECORD);
|
||||
writer.write(data, null);
|
||||
//Allow writer to complete.
|
||||
TimeUnit.SECONDS.sleep(5);
|
||||
writer.close(null);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user