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 1ADDF1096C for ; Tue, 10 Feb 2015 12:36:12 +0000 (UTC) Received: (qmail 53489 invoked by uid 500); 10 Feb 2015 12:36:11 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 53436 invoked by uid 500); 10 Feb 2015 12:36:11 -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 53423 invoked by uid 99); 10 Feb 2015 12:36:11 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Feb 2015 12:36:11 +0000 Date: Tue, 10 Feb 2015 12:36:11 +0000 (UTC) From: "Andrey Stepachev (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-13004) Make possible to explain why HTU.waitFor fails 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-13004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrey Stepachev updated HBASE-13004: ------------------------------------- Attachment: HBASE-13004.patch Added ExplainingPredicate to Waiter Added explainTableAvailability to explain why table possibly was not available (act as example of usage of EP) > Make possible to explain why HTU.waitFor fails > ---------------------------------------------- > > Key: HBASE-13004 > URL: https://issues.apache.org/jira/browse/HBASE-13004 > Project: HBase > Issue Type: Bug > Components: test > Affects Versions: 2.0.0 > Reporter: Andrey Stepachev > Assignee: Andrey Stepachev > Priority: Minor > Attachments: HBASE-13004.patch > > > HBaseTestingUtility has good methods for waiting conditions, but with one drawback, when waitfor fails, there is no way to explain what happened (fail() called from internals and that is not very easy to intercept and explain state of failure). > That would be great to have enhanced Predicate which can explain state after it failed to wait for. > That can looks like > {code} > HUT.waitFor(10000, new ExplainingPredicate() { > boolean evaluate() { > ... some evaluation code > } > String explain() { > ... generate brief explanation of what to be expected, but not happened > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)