|
@@ -163,8 +163,9 @@ public class TestListCorruptFileBlocks {
|
|
|
+ " corrupt files. Expecting None.", badFiles.size() == 0);
|
|
|
|
|
|
// Now deliberately corrupt one block
|
|
|
- File data_dir = new File(System.getProperty("test.build.data"),
|
|
|
- "dfs/data/data1/current/finalized");
|
|
|
+ File storageDir = MiniDFSCluster.getStorageDir(0, 0);
|
|
|
+ File data_dir = MiniDFSCluster.getFinalizedDir(storageDir,
|
|
|
+ cluster.getNamesystem().getBlockPoolId());
|
|
|
assertTrue("data directory does not exist", data_dir.exists());
|
|
|
File[] blocks = data_dir.listFiles();
|
|
|
assertTrue("Blocks do not exist in data-dir", (blocks != null) &&
|