From a5c87acadde8007dd81bfd4656465ced75345c09 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Tue, 22 Nov 2011 17:41:19 +0000 Subject: [PATCH] HBASE-4842 [hbck] Fix intermittent failures on TestHBaseFsck.testHBaseFsck git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1205101 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 ++ .../java/org/apache/hadoop/hbase/util/TestHBaseFsck.java | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index a1bea11f3da..985a464f766 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -439,6 +439,8 @@ Release 0.92.0 - Unreleased time we issued bulk user region close call on our way out HBASE-4815 Disable online altering by default, create a config for it HBASE-4623 Remove @deprecated Scan methods in 0.90 from TRUNK and 0.92 + HBASE-4842 [hbck] Fix intermittent failures on TestHBaseFsck.testHBaseFsck + (Jon Hsieh) TESTS HBASE-4450 test for number of blocks read: to serve as baseline for expected diff --git a/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java b/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java index af1e207d473..0b6accef3ca 100644 --- a/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java +++ b/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java @@ -66,6 +66,7 @@ public class TestHBaseFsck { @BeforeClass public static void setUpBeforeClass() throws Exception { + TEST_UTIL.getConfiguration().setBoolean("hbase.master.distributed.log.splitting", false); TEST_UTIL.startMiniCluster(3); } @@ -116,6 +117,11 @@ public class TestHBaseFsck { assertErrors(doFsck(conf, true), new ERROR_CODE[]{ ERROR_CODE.SERVER_DOES_NOT_MATCH_META}); + // fixing assignements require opening regions is not synchronous. To make + // the test pass consistentyl so for now we bake in some sleep to let it + // finish. 1s seems sufficient. + Thread.sleep(1000); + // Should be fixed now assertNoErrors(doFsck(conf, false));