This is an automated email from the ASF dual-hosted git repository.

tchoi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new d8a218003f4 HIVE-26558 Small test fix in 
TestReplicationOptimisedBootstrap to make test method independent of TxnType 
enums (Amit Saonerkar, reviewed by Teddy Choi)
d8a218003f4 is described below

commit d8a218003f402b368a2c01c8f91a3a684ef8ec7f
Author: atsaonerk <[email protected]>
AuthorDate: Wed Jan 11 14:17:10 2023 +0530

    HIVE-26558 Small test fix in TestReplicationOptimisedBootstrap to make test 
method independent of TxnType enums (Amit Saonerkar, reviewed by Teddy Choi)
---
 .../hive/ql/parse/TestReplicationOptimisedBootstrap.java      | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git 
a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationOptimisedBootstrap.java
 
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationOptimisedBootstrap.java
index 359c48d6605..f11adc462f3 100644
--- 
a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationOptimisedBootstrap.java
+++ 
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationOptimisedBootstrap.java
@@ -1026,8 +1026,13 @@ public class TestReplicationOptimisedBootstrap extends 
BaseReplicationScenariosA
   }
 
   List<Long> getReplCreatedTxns() throws MetaException {
-    List<TxnType> excludedTxns = Arrays.asList(TxnType.DEFAULT, 
TxnType.READ_ONLY, TxnType.COMPACTION,
-            TxnType.MATER_VIEW_REBUILD, TxnType.SOFT_DELETE);
-    return txnHandler.getOpenTxns(excludedTxns).getOpen_txns();
+    List<TxnType> txnListExcludingReplCreated = new ArrayList<>();
+    for (TxnType type : TxnType.values()) {
+      // exclude REPL_CREATED txn
+      if (type != TxnType.REPL_CREATED) {
+        txnListExcludingReplCreated.add(type);
+      }
+    }
+    return txnHandler.getOpenTxns(txnListExcludingReplCreated).getOpen_txns();
   }
 }

Reply via email to