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

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

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



##########
File path: 
ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCompactionMetrics.java
##########
@@ -178,41 +178,44 @@ public void testInitiatorPerfMetricsDisabled() throws 
Exception {
   }
 
   @Test
-  @org.junit.Ignore("HIVE-25716")
   public void testOldestReadyForCleaningAge() throws Exception {
     conf.setIntVar(HiveConf.ConfVars.COMPACTOR_MAX_NUM_DELTA, 1);
 
-    long oldStart = System.currentTimeMillis();
-    Table old = newTable("default", "old_rfc", true);
-    Partition oldP = newPartition(old, "part");
+    final String DB_NAME = "default";
+    final String OLD_TABLE_NAME = "old_rfc";
+    final String OLD_PARTITION_NAME = "part";
+    final String YOUNG_TABLE_NAME = "young_rfc";
+    final String YOUNG_PARTITION_NAME = "part";
+
+    Table old = newTable(DB_NAME, OLD_TABLE_NAME, true);
+    Partition oldP = newPartition(old, OLD_PARTITION_NAME);
     addBaseFile(old, oldP, 20L, 20);
     addDeltaFile(old, oldP, 21L, 22L, 2);
     addDeltaFile(old, oldP, 23L, 24L, 2);
-    burnThroughTransactions("default", "old_rfc", 25);
-    CompactionRequest rqst = new CompactionRequest("default", "old_rfc", 
CompactionType.MINOR);
-    rqst.setPartitionname("ds=part");
-    txnHandler.compact(rqst);
-    startWorker();
+    burnThroughTransactions(DB_NAME, OLD_TABLE_NAME, 25);
+    doCompaction(DB_NAME, OLD_TABLE_NAME, OLD_PARTITION_NAME, 
CompactionType.MINOR);
+    long oldTableClosestCqCommitTime = System.currentTimeMillis();
 
-    long youngStart = System.currentTimeMillis();
-    Table young = newTable("default", "young_rfc", true);
-    Partition youngP = newPartition(young, "part");
+    Table young = newTable(DB_NAME, YOUNG_TABLE_NAME, true);
+    Partition youngP = newPartition(young, YOUNG_PARTITION_NAME);
     addBaseFile(young, youngP, 20L, 20);
     addDeltaFile(young, youngP, 21L, 22L, 2);
     addDeltaFile(young, youngP, 23L, 24L, 2);
-    burnThroughTransactions("default", "young_rfc", 25);
-    rqst = new CompactionRequest("default", "young_rfc", CompactionType.MINOR);
-    rqst.setPartitionname("ds=part");
-    txnHandler.compact(rqst);
-    startWorker();
+    burnThroughTransactions(DB_NAME, YOUNG_TABLE_NAME, 25);
+    doCompaction(DB_NAME, YOUNG_TABLE_NAME, YOUNG_PARTITION_NAME, 
CompactionType.MINOR);
+    long youngTableClosestCqCommitTime = System.currentTimeMillis();
+
+    Thread.sleep(1500);

Review comment:
       what's the purpose of 1.5 sec sleep?




-- 
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: 689880)
    Time Spent: 20m  (was: 10m)

> 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: 20m
>  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