YARN-5379. TestHBaseTimelineStorage. testWriteApplicationToHBase() fails intermittently (Vrushali C via sjlee)
(cherry picked from commit e549a9af3177f6ee83477cde8bd7d0ed72d6ecec) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/21be5828 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/21be5828 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/21be5828 Branch: refs/heads/YARN-5355-branch-2 Commit: 21be5828b290ffe60eac29a5bd47839b4d98c951 Parents: 789a62f Author: Sangjin Lee <sj...@apache.org> Authored: Thu Jul 14 15:19:03 2016 -0700 Committer: Varun Saxena <varunsax...@apache.org> Committed: Sun Nov 6 21:25:25 2016 +0530 ---------------------------------------------------------------------- .../timelineservice/storage/TestHBaseTimelineStorage.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/21be5828/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/TestHBaseTimelineStorage.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/TestHBaseTimelineStorage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/TestHBaseTimelineStorage.java index a8de759..e37865f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/TestHBaseTimelineStorage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/storage/TestHBaseTimelineStorage.java @@ -613,8 +613,8 @@ public class TestHBaseTimelineStorage { TimelineMetric aggMetric = new TimelineMetric(); aggMetric.setId("MEM_USAGE"); Map<Long, Number> aggMetricValues = new HashMap<Long, Number>(); - ts = System.currentTimeMillis(); - aggMetricValues.put(ts - 120000, 102400000L); + long aggTs = ts; + aggMetricValues.put(aggTs - 120000, 102400000L); aggMetric.setType(Type.SINGLE_VALUE); aggMetric.setRealtimeAggregationOp(TimelineMetricOperation.SUM); aggMetric.setValues(aggMetricValues); @@ -819,9 +819,9 @@ public class TestHBaseTimelineStorage { metric.getValues().get(ts - 20000)); } if (metric.getId().equals("MEM_USAGE")) { - assertTrue(metric.getValues().containsKey(ts - 120000)); - assertEquals(aggMetricValues.get(ts - 120000), - metric.getValues().get(ts - 120000)); + assertTrue(metric.getValues().containsKey(aggTs - 120000)); + assertEquals(aggMetricValues.get(aggTs - 120000), + metric.getValues().get(aggTs - 120000)); } } } finally { --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org