HIVE-18186: Fix wrong assertion in TestHiveMetaStoreAlterColumnPar test 
(Bertalan Kondrat reviewed by Vihang Karajgaonkar via Zoltan Haindrich)

Signed-off-by: Zoltan Haindrich <k...@rxd.hu>


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/266d4bb9
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/266d4bb9
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/266d4bb9

Branch: refs/heads/master
Commit: 266d4bb9696db176e7b9d0d54e25b5e64ce86b1a
Parents: 3384117
Author: Bertalan Kondrat <kb.p...@gmail.com>
Authored: Mon Dec 4 09:38:02 2017 +0100
Committer: Zoltan Haindrich <k...@rxd.hu>
Committed: Mon Dec 4 09:38:02 2017 +0100

----------------------------------------------------------------------
 .../hadoop/hive/metastore/TestHiveMetaStoreAlterColumnPar.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/266d4bb9/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreAlterColumnPar.java
----------------------------------------------------------------------
diff --git 
a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreAlterColumnPar.java
 
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreAlterColumnPar.java
index 569e932..4b95fe7 100644
--- 
a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreAlterColumnPar.java
+++ 
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreAlterColumnPar.java
@@ -18,8 +18,8 @@
 
 package org.apache.hadoop.hive.metastore;
 
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
@@ -100,7 +100,7 @@ public class TestHiveMetaStoreAlterColumnPar {
       // parameter value not changed to false in connection 2.  int to 
smallint throws exception
       try {
         stmt2.execute("alter table t1 change column c1 c1 smallint");
-        assertTrue("Exception not thrown", true);
+        fail("Exception not thrown");
       } catch (Exception e1) {
         assertTrue("Unexpected exception: " + e1.getMessage(), 
e1.getMessage().contains(
             "Unable to alter table. The following columns have types 
incompatible with the existing columns in their respective positions"));
@@ -109,7 +109,7 @@ public class TestHiveMetaStoreAlterColumnPar {
       // parameter value is still false in 1st connection.  The alter still 
goes through.
       stmt1.execute("alter table t1 change column c1 c1 smallint");
     } catch (Exception e2) {
-      assertTrue("Unexpected Exception: " + e2.getMessage(), true);
+      fail("Unexpected Exception: " + e2.getMessage());
     }
   }
 }

Reply via email to