[ 
https://issues.apache.org/jira/browse/HIVE-25716?focusedWorklogId=689894&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-689894
 ]

ASF GitHub Bot logged work on HIVE-25716:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Dec/21 10:36
            Start Date: 03/Dec/21 10:36
    Worklog Time Spent: 10m 
      Work Description: deniskuzZ commented on a change in pull request #2837:
URL: https://github.com/apache/hive/pull/2837#discussion_r761822390



##########
File path: 
ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/CompactorTest.java
##########
@@ -292,22 +292,24 @@ protected void burnThroughTransactions(String dbName, 
String tblName, int num, S
     burnThroughTransactions(dbName, tblName, num, open, aborted, null);
   }
 
-  protected void burnThroughTransactions(String dbName, String tblName, int 
num, Set<Long> open, Set<Long> aborted, LockRequest lockReq)
+  protected void burnThroughTransactions(String dbName, String tblName, int 
num, Set<Long> open, Set<Long> aborted,
+      LockRequest lockReq)
       throws MetaException, NoSuchTxnException, TxnAbortedException {
     OpenTxnsResponse rsp = txnHandler.openTxns(new OpenTxnRequest(num, "me", 
"localhost"));
     AllocateTableWriteIdsRequest awiRqst = new 
AllocateTableWriteIdsRequest(dbName, tblName);
     awiRqst.setTxnIds(rsp.getTxn_ids());
     AllocateTableWriteIdsResponse awiResp = 
txnHandler.allocateTableWriteIds(awiRqst);
     int i = 0;
     for (long tid : rsp.getTxn_ids()) {
-      assert(awiResp.getTxnToWriteIds().get(i++).getTxnId() == tid);
-      if(lockReq != null) {
+      assert (awiResp.getTxnToWriteIds().get(i).getTxnId() == tid);
+      ++i;
+      if (lockReq != null) {
         lockReq.setTxnid(tid);
         txnHandler.lock(lockReq);
       }
-      if (aborted != null && aborted.contains(tid)) {
+      if ((aborted != null) && aborted.contains(tid)) {
         txnHandler.abortTxn(new AbortTxnRequest(tid));
-      } else if (open == null || (open != null && !open.contains(tid))) {
+      } else if ((open == null) || !open.contains(tid)) {

Review comment:
       unnecessary brackets




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 689894)
    Time Spent: 50m  (was: 40m)

> Fix flaky test TestCompactionMetrics#testOldestReadyForCleaningAge
> ------------------------------------------------------------------
>
>                 Key: HIVE-25716
>                 URL: https://issues.apache.org/jira/browse/HIVE-25716
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 4.0.0
>            Reporter: Karen Coppage
>            Assignee: Viktor Csomor
>            Priority: Major
>              Labels: flaky-test, pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Flaky check failed on run #59:
> [http://ci.hive.apache.org/job/hive-flaky-check/467/|http://ci.hive.apache.org/job/hive-flaky-check/467/]
> {code:java}
> java.lang.AssertionError
>       at org.junit.Assert.fail(Assert.java:87)
>       at org.junit.Assert.assertTrue(Assert.java:42)
>       at org.junit.Assert.assertTrue(Assert.java:53)
>       at 
> org.apache.hadoop.hive.ql.txn.compactor.TestCompactionMetrics.testOldestReadyForCleaningAge(TestCompactionMetrics.java:214)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to