diff --git a/build.gradle b/build.gradle index a0f9d7c..bc38076 100644 --- a/build.gradle +++ b/build.gradle @@ -77,7 +77,9 @@ dependencies { compile group: 'com.google.code.gson', name: 'gson', version: gsonVersion testCompile group: 'junit', name: 'junit', version: junitVersion - testCompile group: 'io.pravega', name: 'pravega-standalone', version: pravegaVersion + testCompile(group: 'io.pravega', name: 'pravega-standalone', version: pravegaVersion) { + exclude group: 'com.sun.jersey', module: 'jersey-core' + } testCompile group: 'org.mockito', name: 'mockito-all', version: mockitoVersion testCompile group: 'org.apache.hadoop', name: 'hadoop-common', version: hadoopVersion diff --git a/src/test/java/io/pravega/connectors/hadoop/PravegaConnectorLocalJobITCase.java b/src/test/java/io/pravega/connectors/hadoop/PravegaConnectorLocalJobITCase.java index a3dc968..4bf4199 100644 --- a/src/test/java/io/pravega/connectors/hadoop/PravegaConnectorLocalJobITCase.java +++ b/src/test/java/io/pravega/connectors/hadoop/PravegaConnectorLocalJobITCase.java @@ -67,6 +67,7 @@ public void testPravegaConnector() throws Exception { // TEST 0: without start or end writer.writeEvent("begin"); writer.writeEvent("pravega local job test"); + writer.flush(); // setup local job runner outputPath = new Path("src/test/java/io/pravega/connectors/hadoop/localjobrunnertestdir/"); @@ -94,6 +95,7 @@ public void testPravegaConnector() throws Exception { // TEST 1: with end position only writer.writeEvent("streamcut1 endonly"); + writer.flush(); fs = FileSystem.getLocal(conf); if (fs.exists(outputPath)) { @@ -105,6 +107,7 @@ public void testPravegaConnector() throws Exception { // won't be read because it's written after end poisitions are fetched writer.writeEvent("onemore"); + writer.flush(); job = configureJob(conf, outputPath, "", endPos1); status = job.waitForCompletion(true); @@ -124,6 +127,7 @@ public void testPravegaConnector() throws Exception { // TEST 2: with both start and end positions writer.writeEvent("streamcut2 startandend"); + writer.flush(); fs = FileSystem.getLocal(conf); if (fs.exists(outputPath)) { @@ -135,6 +139,7 @@ public void testPravegaConnector() throws Exception { // won't be read because it's written after end poisitions are fetched writer.writeEvent("twomore"); + writer.flush(); job = configureJob(conf, outputPath, endPos1, endPos2); status = job.waitForCompletion(true); @@ -149,6 +154,7 @@ public void testPravegaConnector() throws Exception { // TEST 3: with start positions only writer.writeEvent("streamcut3 startonly"); + writer.flush(); fs = FileSystem.getLocal(conf); if (fs.exists(outputPath)) { diff --git a/src/test/java/io/pravega/connectors/hadoop/PravegaConnectorMiniYarnITCase.java b/src/test/java/io/pravega/connectors/hadoop/PravegaConnectorMiniYarnITCase.java index 41259de..c2a195e 100644 --- a/src/test/java/io/pravega/connectors/hadoop/PravegaConnectorMiniYarnITCase.java +++ b/src/test/java/io/pravega/connectors/hadoop/PravegaConnectorMiniYarnITCase.java @@ -29,7 +29,6 @@ import org.junit.After; import org.junit.Assert; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import java.io.BufferedReader; @@ -60,6 +59,7 @@ public void setUp() throws Exception { writer.writeEvent("pravega test"); writer.writeEvent("pravega job test"); writer.writeEvent("pravega local job test"); + writer.flush(); // setup mini dfs cluster YarnConfiguration conf = new YarnConfiguration(); @@ -93,7 +93,7 @@ public void tearDownPravega() throws Exception { SETUP_UTILS.stopAllServices(); } - @Ignore @Test // TODO (issue #38): ignore it now since it only works with submodule build. + @Test public void testPravegaConnector() throws Exception { boolean status = job.waitForCompletion(true); Assert.assertTrue(job.isSuccessful());