From e0f913323eef768fe38adcf4aadf089432b4470d Mon Sep 17 00:00:00 2001 From: stack Date: Mon, 27 Jan 2020 12:05:01 -0800 Subject: [PATCH] HBASE-23746 [Flakey Tests] Caused by: org.apache.hadoop.hbase.util.CommonFSUtils$StreamLacksCapabilityException: hflush and hsync --- .../apache/hadoop/hbase/io/hfile/TestHFilePrettyPrinter.java | 3 +++ .../procedure2/store/region/RegionProcedureStoreTestBase.java | 2 ++ 2 files changed, 5 insertions(+) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFilePrettyPrinter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFilePrettyPrinter.java index e0a168eddf1..f8c85a234e3 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFilePrettyPrinter.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFilePrettyPrinter.java @@ -33,6 +33,7 @@ import org.apache.hadoop.hbase.regionserver.TestHRegionServerBulkLoad; import org.apache.hadoop.hbase.testclassification.IOTests; import org.apache.hadoop.hbase.testclassification.SmallTests; import org.apache.hadoop.hbase.util.Bytes; +import org.apache.hadoop.hbase.util.CommonFSUtils; import org.apache.hadoop.hbase.util.FSUtils; import org.junit.After; import org.junit.Before; @@ -64,6 +65,8 @@ public class TestHFilePrettyPrinter { @Before public void setup() throws Exception { conf = UTIL.getConfiguration(); + // Runs on local filesystem. Test does not need sync. Turn off checks. + conf.setBoolean(CommonFSUtils.UNSAFE_STREAM_CAPABILITY_ENFORCE, false); fs = UTIL.getTestFileSystem(); stream = new ByteArrayOutputStream(); ps = new PrintStream(stream); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure2/store/region/RegionProcedureStoreTestBase.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure2/store/region/RegionProcedureStoreTestBase.java index c5694d2be87..3ffadf6cac5 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure2/store/region/RegionProcedureStoreTestBase.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure2/store/region/RegionProcedureStoreTestBase.java @@ -46,6 +46,8 @@ public class RegionProcedureStoreTestBase { public void setUp() throws IOException { htu = new HBaseCommonTestingUtility(); htu.getConfiguration().setBoolean(MemStoreLAB.USEMSLAB_KEY, false); + // Runs on local filesystem. Test does not need sync. Turn off checks. + htu.getConfiguration().setBoolean(CommonFSUtils.UNSAFE_STREAM_CAPABILITY_ENFORCE, false); configure(htu.getConfiguration()); Path testDir = htu.getDataTestDir(); CommonFSUtils.setWALRootDir(htu.getConfiguration(), testDir);