HDFS-13287. TestINodeFile#testGetBlockType results in NPE when run alone. Contributed by Virajith Jalaparti.

Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org>
(cherry picked from commit 333633d9935acd5787ee8688bc9d2d7b7c058def)
This commit is contained in:
Virajith Jalaparti 2019-06-18 22:13:07 -07:00 committed by Wei-Chiu Chuang
parent 7c00756aff
commit 36dc0810bf
1 changed files with 1 additions and 0 deletions

View File

@ -296,6 +296,7 @@ public class TestINodeFile {
preferredBlockSize = 128*1024*1024;
INodeFile inf = createINodeFile(replication, preferredBlockSize);
assertEquals(inf.getBlockType(), CONTIGUOUS);
ErasureCodingPolicyManager.getInstance().init(new Configuration());
INodeFile striped = createStripedINodeFile(preferredBlockSize);
assertEquals(striped.getBlockType(), STRIPED);
}