Skip to content
Permalink
Browse files
fix-tests
closes #86
  • Loading branch information
Maja Kabiljo committed Sep 21, 2018
1 parent 7f6a33d commit 843cd6eea60431ae527164f8fe9b0e054c7f9157
Showing 1 changed file with 5 additions and 0 deletions.
@@ -34,6 +34,7 @@
import org.apache.giraph.utils.PairList;
import org.apache.giraph.worker.WorkerInfo;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.mapreduce.Counter;
import org.apache.hadoop.mapreduce.Mapper.Context;
import org.junit.Before;
import org.junit.Test;
@@ -45,6 +46,7 @@
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.any;

/**
* Test all the netty failure scenarios
@@ -72,6 +74,9 @@ public void setUp() throws IOException {

context = mock(Context.class);
when(context.getConfiguration()).thenReturn(conf);
Counter counter = mock(Counter.class);
when(context.getCounter(any(String.class), any(String.class))).thenReturn(
counter);
}

private WritableRequest getRequest() {

0 comments on commit 843cd6e

Please sign in to comment.