Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 86437DA30 for ; Wed, 6 Feb 2013 22:20:14 +0000 (UTC) Received: (qmail 19232 invoked by uid 500); 6 Feb 2013 22:20:14 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 19199 invoked by uid 500); 6 Feb 2013 22:20:14 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 19190 invoked by uid 99); 6 Feb 2013 22:20:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2013 22:20:14 +0000 Date: Wed, 6 Feb 2013 22:20:14 +0000 (UTC) From: "Jonathan Hsieh (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-7778) [snapshot 130201 merge] Tests with sleep after minicluster shutdown fail due to interrupt flag. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-7778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13572918#comment-13572918 ] Jonathan Hsieh commented on HBASE-7778: --------------------------------------- I'm more concerned about these tests being racy and flakey due to the noWait variable in the JVMClusterUtil#shutdown method. > [snapshot 130201 merge] Tests with sleep after minicluster shutdown fail due to interrupt flag. > ----------------------------------------------------------------------------------------------- > > Key: HBASE-7778 > URL: https://issues.apache.org/jira/browse/HBASE-7778 > Project: HBase > Issue Type: Sub-task > Reporter: Jonathan Hsieh > > Something in the merge has set the interrupted flag on the main test threads of TestReplicationDisabledinactivePeer, TestRestartCluster, and TestCatalogTrackerOnCluster. > These unacceptable hacks make the tests run and pass: > {code} > diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/catalog/TestCatalogTrackerOnCluster.java b/hbase-server/src/test/java/or > index f3e57d6..a8d2ef7 100644 > --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/catalog/TestCatalogTrackerOnCluster.java > +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/catalog/TestCatalogTrackerOnCluster.java > @@ -47,6 +47,7 @@ public class TestCatalogTrackerOnCluster { > // Shutdown hbase. > UTIL.shutdownMiniHBaseCluster(); > // Give the various ZKWatchers some time to settle their affairs. > + Thread.interrupted(); // HACK clear interrupt state. > Thread.sleep(1000); > > // Mess with the root location in the running zk. Set it to be nonsense. > diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestRestartCluster.java b/hbase-server/src/test/java/org/apache/h > index 15225e1..9f7f526 100644 > --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestRestartCluster.java > +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestRestartCluster.java > @@ -108,6 +108,7 @@ public class TestRestartCluster { > UTIL.shutdownMiniHBaseCluster(); > > LOG.info("\n\nSleeping a bit"); > + Thread.interrupted(); // HACK clear interrupt state. > Thread.sleep(2000); > > LOG.info("\n\nStarting cluster the second time"); > diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationDisableInactivePeer.java b/hbase-server/src/t > index b089fbe..8162f4b 100644 > --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationDisableInactivePeer.java > +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationDisableInactivePeer.java > @@ -50,6 +50,7 @@ public class TestReplicationDisableInactivePeer extends TestReplicationBase { > // enabling and shutdown the peer > admin.enablePeer("2"); > utility2.shutdownMiniHBaseCluster(); > + Thread.interrupted(); // HACK clear interrupted flag. > > byte[] rowkey = Bytes.toBytes("disable inactive peer"); > Put put = new Put(rowkey); > {code} > On the snapshot branch and on the trunk branch before the merge, these tests passed. Need to figure out how they combination caused this behavior change. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira