Repository: hive Updated Branches: refs/heads/branch-1 ae4d5ceb0 -> cf64d7521
HIVE-14414 Fix TestHiveMetaStoreTxns UTs (Eugene Koifman, reviewed by Wei Zheng) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/cf64d752 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/cf64d752 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/cf64d752 Branch: refs/heads/branch-1 Commit: cf64d7521944e6a4e1f2d0b6486424e0ba7ae4a9 Parents: ae4d5ce Author: Eugene Koifman <ekoif...@hortonworks.com> Authored: Wed Aug 3 16:26:13 2016 -0700 Committer: Eugene Koifman <ekoif...@hortonworks.com> Committed: Wed Aug 3 16:26:13 2016 -0700 ---------------------------------------------------------------------- .../hadoop/hive/metastore/TestHiveMetaStoreTxns.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/cf64d752/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java ---------------------------------------------------------------------- diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java index f0646f6..142fd6c 100644 --- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java +++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java @@ -127,7 +127,7 @@ public class TestHiveMetaStoreTxns { Assert.assertEquals(ValidTxnList.RangeResponse.NONE, validTxns.isTxnRangeValid(5L, 10L)); - validTxns = new ValidReadTxnList("10:4:5:6"); + validTxns = new ValidReadTxnList("10:5:4:5:6"); Assert.assertEquals(ValidTxnList.RangeResponse.NONE, validTxns.isTxnRangeValid(4,6)); Assert.assertEquals(ValidTxnList.RangeResponse.ALL, @@ -222,24 +222,24 @@ public class TestHiveMetaStoreTxns { @Test public void stringifyValidTxns() throws Exception { // Test with just high water mark - ValidTxnList validTxns = new ValidReadTxnList("1:"); + ValidTxnList validTxns = new ValidReadTxnList("1:" + Long.MAX_VALUE + ":"); String asString = validTxns.toString(); - Assert.assertEquals("1:", asString); + Assert.assertEquals("1:" + Long.MAX_VALUE + ":", asString); validTxns = new ValidReadTxnList(asString); Assert.assertEquals(1, validTxns.getHighWatermark()); Assert.assertNotNull(validTxns.getInvalidTransactions()); Assert.assertEquals(0, validTxns.getInvalidTransactions().length); asString = validTxns.toString(); - Assert.assertEquals("1:", asString); + Assert.assertEquals("1:" + Long.MAX_VALUE + ":", asString); validTxns = new ValidReadTxnList(asString); Assert.assertEquals(1, validTxns.getHighWatermark()); Assert.assertNotNull(validTxns.getInvalidTransactions()); Assert.assertEquals(0, validTxns.getInvalidTransactions().length); // Test with open transactions - validTxns = new ValidReadTxnList("10:5:3"); + validTxns = new ValidReadTxnList("10:3:5:3"); asString = validTxns.toString(); - if (!asString.equals("10:3:5") && !asString.equals("10:5:3")) { + if (!asString.equals("10:3:3:5") && !asString.equals("10:3:5:3")) { Assert.fail("Unexpected string value " + asString); } validTxns = new ValidReadTxnList(asString);