Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DD1BB200C3D for ; Tue, 14 Mar 2017 16:16:15 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DBA77160B7C; Tue, 14 Mar 2017 15:16:15 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 33570160B7E for ; Tue, 14 Mar 2017 16:16:15 +0100 (CET) Received: (qmail 76917 invoked by uid 500); 14 Mar 2017 15:16:14 -0000 Mailing-List: contact commits-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hive.apache.org Delivered-To: mailing list commits@hive.apache.org Received: (qmail 76906 invoked by uid 99); 14 Mar 2017 15:16:14 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Mar 2017 15:16:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3E266DFE1E; Tue, 14 Mar 2017 15:16:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hashutosh@apache.org To: commits@hive.apache.org Message-Id: <73c07901c4674fc3868974630ea3d96c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: hive git commit: HIVE-16192 : QTestUtil doesn't correctly set the last command when running "test" commands (Sahil Takiar via Ashutosh Chauhan) Date: Tue, 14 Mar 2017 15:16:14 +0000 (UTC) archived-at: Tue, 14 Mar 2017 15:16:16 -0000 Repository: hive Updated Branches: refs/heads/master 253ce3917 -> b6e39c9e8 HIVE-16192 : QTestUtil doesn't correctly set the last command when running "test" commands (Sahil Takiar via Ashutosh Chauhan) Signed-off-by: Ashutosh Chauhan Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/b6e39c9e Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/b6e39c9e Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/b6e39c9e Branch: refs/heads/master Commit: b6e39c9e87ba275f5d243f83a2231eeb8f991890 Parents: 253ce39 Author: Sahil Takiar Authored: Tue Mar 14 08:15:39 2017 -0700 Committer: Ashutosh Chauhan Committed: Tue Mar 14 08:15:39 2017 -0700 ---------------------------------------------------------------------- .../src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/b6e39c9e/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java ---------------------------------------------------------------------- diff --git a/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java b/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java index 7a36b46..f469def 100644 --- a/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java +++ b/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java @@ -1384,6 +1384,10 @@ public class QTestUtil { commandArgs = commandArgs.replaceAll("\\$\\{hiveconf:hive\\.metastore\\.warehouse\\.dir\\}", wareHouseDir); + if (SessionState.get() != null) { + SessionState.get().setLastCommand(commandName + " " + commandArgs.trim()); + } + enableTestOnlyCmd(SessionState.get().getConf()); try { @@ -2196,7 +2200,7 @@ public class QTestUtil { public void failed(int ecode, String fname, String debugHint) { String command = SessionState.get() != null ? SessionState.get().getLastCommand() : null; String message = "Client execution failed with error code = " + ecode + - (command != null ? " running " + command : "") + "fname=" + fname + + (command != null ? " running \"" + command : "") + "\" fname=" + fname + " " + (debugHint != null ? debugHint : ""); LOG.error(message); Assert.fail(message);