YARN-5379. TestHBaseTimelineStorage. testWriteApplicationToHBase() fails intermittently (Vrushali C via sjlee)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/e549a9af Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e549a9af Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e549a9af Branch: refs/heads/YARN-2915 Commit: e549a9af3177f6ee83477cde8bd7d0ed72d6ecec Parents: 5537c6b Author: Sangjin Lee <[email protected]> Authored: Thu Jul 14 15:19:03 2016 -0700 Committer: Sangjin Lee <[email protected]> Committed: Thu Jul 14 15:19:03 2016 -0700 ---------------------------------------------------------------------- .../timelineservice/storage/TestHBaseTimelineStorage.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/e549a9af/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: [email protected] For additional commands, e-mail: [email protected]
