From 3c1fb870e20bf2d0316a7eb0aa524e437499ab05 Mon Sep 17 00:00:00 2001 From: Szabolcs Vasas Date: Mon, 3 Dec 2018 11:53:21 +0100 Subject: [PATCH] SQOOP-3393: TestNetezzaExternalTableExportMapper hangs (Daniel Voros via Szabolcs Vasas) This closes #63 --- .../db/netezza/TestNetezzaExternalTableExportMapper.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/org/apache/sqoop/mapreduce/db/netezza/TestNetezzaExternalTableExportMapper.java b/src/test/org/apache/sqoop/mapreduce/db/netezza/TestNetezzaExternalTableExportMapper.java index b93c646d..0f2d53f6 100644 --- a/src/test/org/apache/sqoop/mapreduce/db/netezza/TestNetezzaExternalTableExportMapper.java +++ b/src/test/org/apache/sqoop/mapreduce/db/netezza/TestNetezzaExternalTableExportMapper.java @@ -44,6 +44,7 @@ import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; +import java.util.UUID; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; @@ -53,6 +54,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +@Category(UnitTest.class) public class TestNetezzaExternalTableExportMapper { // chained rule, see #rules @@ -199,6 +201,7 @@ private Mapper.Context getContext() throws java.io.IOException, InterruptedExcep Mapper.Context context = mock(Mapper.Context.class); Configuration conf = new Configuration(); + conf.set("mapreduce.task.id", UUID.randomUUID().toString()); when(context.getConfiguration()).thenReturn(conf); TaskAttemptID taskAttemptID = new TaskAttemptID();