Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B6C81184D1 for ; Wed, 23 Dec 2015 15:06:51 +0000 (UTC) Received: (qmail 37860 invoked by uid 500); 23 Dec 2015 15:06:41 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 37797 invoked by uid 500); 23 Dec 2015 15:06:41 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 36826 invoked by uid 99); 23 Dec 2015 15:06:41 -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; Wed, 23 Dec 2015 15:06:41 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 73286E0B16; Wed, 23 Dec 2015 15:06:41 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ncole@apache.org To: commits@ambari.apache.org Date: Wed, 23 Dec 2015 15:07:25 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [46/51] [abbrv] ambari git commit: AMBARI-14442. Typo in error message displayed when connection fails in Hive view (alexantonenko) AMBARI-14442. Typo in error message displayed when connection fails in Hive view (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/37a0ff7e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/37a0ff7e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/37a0ff7e Branch: refs/heads/branch-dev-patch-upgrade Commit: 37a0ff7ec1bd07f1ebfe35ed82bb6149b15e2234 Parents: 8eb449b Author: Alex Antonenko Authored: Wed Dec 23 13:49:54 2015 +0200 Committer: Alex Antonenko Committed: Wed Dec 23 13:50:04 2015 +0200 ---------------------------------------------------------------------- .../org/apache/ambari/view/hive/client/Connection.java | 2 +- .../apache/ambari/view/hive/client/ConnectionTest.java | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/37a0ff7e/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java ---------------------------------------------------------------------- diff --git a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java index b64a2a5..d69a1a5 100644 --- a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java +++ b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java @@ -107,7 +107,7 @@ public class Connection { transport.open(); client = new TCLIService.Client(new TBinaryProtocol(transport)); } catch (TTransportException e) { - throw new HiveClientException("H020 Could not establish connecton to " + throw new HiveClientException("H020 Could not establish connection to " + host + ":" + port + ": " + e.toString(), e); } catch (SQLException e) { throw new HiveClientException(e.getMessage(), e); http://git-wip-us.apache.org/repos/asf/ambari/blob/37a0ff7e/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/client/ConnectionTest.java ---------------------------------------------------------------------- diff --git a/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/client/ConnectionTest.java b/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/client/ConnectionTest.java index bd8dbf9..0b57b6a 100644 --- a/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/client/ConnectionTest.java +++ b/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/client/ConnectionTest.java @@ -41,6 +41,16 @@ public class ConnectionTest { } @Test + public void testOpenConnectionMessage() throws Exception { + HashMap auth = new HashMap(); + auth.put("auth", "NONE"); + + thrown.expect(HiveClientException.class); + thrown.expectMessage("H020 Could not establish connection to"); + new Connection("127.0.0.1", 42420, auth, "ambari-qa", null); + } + + @Test public void testAskPasswordWithoutPassword() throws Exception { HashMap auth = new HashMap(); auth.put("auth", "NONE");