Fix test
Change-Id: I4639f791febc29d7f89ee5905e043b5dcb1071dc
This commit is contained in:
parent
bf7c689fd7
commit
00bc6a1f6b
|
@ -26,6 +26,8 @@ import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
|
@ -415,8 +417,9 @@ public class TestFSUtils {
|
||||||
* Note: currently the default policy is set to defer to HDFS and this case is to verify the
|
* Note: currently the default policy is set to defer to HDFS and this case is to verify the
|
||||||
* logic, will need to remove the check if the default policy is changed
|
* logic, will need to remove the check if the default policy is changed
|
||||||
*/
|
*/
|
||||||
private void verifyNoHDFSApiInvocationForDefaultPolicy() {
|
private void verifyNoHDFSApiInvocationForDefaultPolicy() throws URISyntaxException, IOException {
|
||||||
FileSystem testFs = new AlwaysFailSetStoragePolicyFileSystem();
|
FileSystem testFs = new AlwaysFailSetStoragePolicyFileSystem();
|
||||||
|
testFs.initialize(new URI("hdfs://localhost/"), conf);
|
||||||
// There should be no exception thrown when setting to default storage policy, which indicates
|
// There should be no exception thrown when setting to default storage policy, which indicates
|
||||||
// the HDFS API hasn't been called
|
// the HDFS API hasn't been called
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue