Skip to content

Commit

Permalink
issue 38: fix the jersey-core dependency conflict (#41)
Browse files Browse the repository at this point in the history
Signed-off-by: Bo Yang <[email protected]>
  • Loading branch information
yangb8 authored Jun 21, 2018
1 parent 287edc1 commit 1a0dde3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/");
Expand Down Expand Up @@ -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)) {
Expand All @@ -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);
Expand All @@ -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)) {
Expand All @@ -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);
Expand All @@ -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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 1a0dde3

Please sign in to comment.