|
@@ -19,6 +19,7 @@ package org.apache.hadoop.hdfs.server.blockmanagement;
|
|
|
|
|
|
import static org.junit.Assert.assertEquals;
|
|
|
import static org.junit.Assert.assertTrue;
|
|
|
+import static org.junit.Assume.assumeTrue;
|
|
|
|
|
|
import java.io.Closeable;
|
|
|
import java.io.File;
|
|
@@ -68,6 +69,10 @@ public class TestRBWBlockInvalidation {
|
|
|
@Test(timeout=60000)
|
|
|
public void testBlockInvalidationWhenRBWReplicaMissedInDN()
|
|
|
throws IOException, InterruptedException {
|
|
|
+ // This test cannot pass on Windows due to file locking enforcement. It will
|
|
|
+ // reject the attempt to delete the block file from the RBW folder.
|
|
|
+ assumeTrue(!Path.WINDOWS);
|
|
|
+
|
|
|
Configuration conf = new HdfsConfiguration();
|
|
|
conf.setInt(DFSConfigKeys.DFS_REPLICATION_KEY, 2);
|
|
|
conf.setLong(DFSConfigKeys.DFS_BLOCKREPORT_INTERVAL_MSEC_KEY, 100);
|