|
@@ -90,6 +90,7 @@ import org.apache.hadoop.util.Time;
|
|
|
import org.apache.log4j.Level;
|
|
|
import org.junit.Assert;
|
|
|
import org.junit.Test;
|
|
|
+import org.junit.Before;
|
|
|
import org.mockito.Mockito;
|
|
|
import org.mockito.internal.stubbing.answers.ThrowsException;
|
|
|
import org.mockito.invocation.InvocationOnMock;
|
|
@@ -107,7 +108,7 @@ public class TestDFSClientRetries {
|
|
|
final static private int MIN_SLEEP_TIME = 1000;
|
|
|
public static final Log LOG =
|
|
|
LogFactory.getLog(TestDFSClientRetries.class.getName());
|
|
|
- final static private Configuration conf = new HdfsConfiguration();
|
|
|
+ static private Configuration conf = null;
|
|
|
|
|
|
private static class TestServer extends Server {
|
|
|
private boolean sleep;
|
|
@@ -157,6 +158,11 @@ public class TestDFSClientRetries {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Before
|
|
|
+ public void setupConf(){
|
|
|
+ conf = new HdfsConfiguration();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* This makes sure that when DN closes clients socket after client had
|
|
|
* successfully connected earlier, the data can still be fetched.
|