ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [46/51] [abbrv] ambari git commit: AMBARI-14442. Typo in error message displayed when connection fails in Hive view (alexantonenko)
Date Wed, 23 Dec 2015 15:07:25 GMT
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 <hiveww@gmail.com>
Authored: Wed Dec 23 13:49:54 2015 +0200
Committer: Alex Antonenko <hiveww@gmail.com>
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<String, String> auth = new HashMap<String, String>();
+    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<String, String> auth = new HashMap<String, String>();
     auth.put("auth", "NONE");


Mime
View raw message