You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Viktor Csomor (Jira)" <ji...@apache.org> on 2021/12/07 08:00:00 UTC
[jira] [Comment Edited] (HIVE-25716) Fix flaky test TestCompactionMetrics#testOldestReadyForCleaningAge
[ https://issues.apache.org/jira/browse/HIVE-25716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17454445#comment-17454445 ]
Viktor Csomor edited comment on HIVE-25716 at 12/7/21, 7:59 AM:
----------------------------------------------------------------
The below modified code failed locally, however it failed in the line 215. Still investigating.
Check:
{code}
runAcidMetricService();
long now = System.currentTimeMillis();
long oldDiff = (now - oldStart)/1000;
long youngDiff = (now - youngStart)/1000;
long threshold = 1000;
int intValue = Metrics.getOrCreateGauge(MetricsConstants.OLDEST_READY_FOR_CLEANING_AGE).intValue();
System.err.println("Now: " + now);
System.err.println("Old start: " + oldStart);
System.err.println("Young start: " + youngStart);
System.err.println("Old diff: " + oldDiff);
System.err.println("Young diff: " + youngDiff);
System.err.println("Age: " + intValue);
boolean assertValue = (intValue <= (oldDiff + threshold));
Assert.assertTrue(assertValue);
{code}
Output
{code}
Now: 1638863282765
Old start: 1638863245187
Young start: 1638863263762
Old diff: 37 (diff 37578)
Young diff: 19 (19003)
Age: 18
{code}
was (Author: vcsomor):
The below modified code failed locally, however it failed in the line 215. Still investigating.
Check:
{code}
runAcidMetricService();
long now = System.currentTimeMillis();
long oldDiff = (now - oldStart)/1000;
long youngDiff = (now - youngStart)/1000;
long threshold = 1000;
int intValue = Metrics.getOrCreateGauge(MetricsConstants.OLDEST_READY_FOR_CLEANING_AGE).intValue();
System.err.println("Now: " + now);
System.err.println("Old start: " + oldStart);
System.err.println("Young start: " + youngStart);
System.err.println("Old diff: " + oldDiff);
System.err.println("Young diff: " + youngDiff);
System.err.println("Age: " + intValue);
boolean assertValue = (intValue <= (oldDiff + threshold));
Assert.assertTrue(assertValue);
{code}
Output
{code}
Now: 1638863282765
Old start: 1638863245187
Young start: 1638863263762
Old diff: 37
Young diff: 19
Age: 18
{code}
> 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)