|
@@ -36,6 +36,7 @@ import org.apache.hadoop.net.unix.DomainSocket;
|
|
|
import org.apache.hadoop.net.unix.TemporarySocketDirectory;
|
|
|
import org.junit.After;
|
|
|
import org.junit.Assert;
|
|
|
+import org.junit.Assume;
|
|
|
import org.junit.Before;
|
|
|
import org.junit.Test;
|
|
|
|
|
@@ -47,6 +48,7 @@ import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_DOMAIN_SOCKET_PATH_KEY;
|
|
|
import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_CLIENT_READ_SHORTCIRCUIT_KEY;
|
|
|
import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_CLIENT_READ_SHORTCIRCUIT_SKIP_CHECKSUM_KEY;
|
|
|
import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_CLIENT_DOMAIN_SOCKET_DATA_TRAFFIC;
|
|
|
+import static org.hamcrest.CoreMatchers.equalTo;
|
|
|
|
|
|
public class TestBlockReaderFactory {
|
|
|
static final Log LOG = LogFactory.getLog(TestBlockReaderFactory.class);
|
|
@@ -56,6 +58,11 @@ public class TestBlockReaderFactory {
|
|
|
DomainSocket.disableBindPathValidation();
|
|
|
}
|
|
|
|
|
|
+ @Before
|
|
|
+ public void before() {
|
|
|
+ Assume.assumeThat(DomainSocket.getLoadingFailureReason(), equalTo(null));
|
|
|
+ }
|
|
|
+
|
|
|
@After
|
|
|
public void cleanup() {
|
|
|
DFSInputStream.tcpReadsDisabledForTesting = false;
|