Fix TestShortCircuitCache.

Change-Id: Ie6fcec5dde5e19406e243df3bd88b232a5e49d06
This commit is contained in:
Siyao Meng 2021-08-19 22:10:39 -07:00
parent 93e3046bf0
commit d5adaac439
1 changed files with 1 additions and 4 deletions

View File

@ -21,8 +21,6 @@ import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_BLOCK_SIZE_KEY;
import static org.apache.hadoop.hdfs.client.HdfsClientConfigKeys.DFS_CLIENT_CONTEXT;
import static org.apache.hadoop.hdfs.client.HdfsClientConfigKeys.DFS_CLIENT_DOMAIN_SOCKET_DATA_TRAFFIC;
import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_DOMAIN_SOCKET_PATH_KEY;
import static org.apache.hadoop.hdfs.client.HdfsClientConfigKeys.DFS_CLIENT_SOCKET_TIMEOUT_KEY;
import static org.hamcrest.CoreMatchers.equalTo;
import java.io.DataOutputStream;
import java.io.File;
@ -84,7 +82,6 @@ import org.apache.hadoop.util.DataChecksum;
import org.apache.hadoop.util.Time;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Assumptions;
import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
@ -412,7 +409,7 @@ public class TestShortCircuitCache {
conf.setBoolean(DFS_CLIENT_DOMAIN_SOCKET_DATA_TRAFFIC, false);
DFSInputStream.tcpReadsDisabledForTesting = true;
DomainSocket.disableBindPathValidation();
Assumptions.assumeThat(DomainSocket.getLoadingFailureReason(), equalTo(null));
Assertions.assertNull(DomainSocket.getLoadingFailureReason());
return conf;
}