YARN-5379. TestHBaseTimelineStorage. testWriteApplicationToHBase() fails intermittently (Vrushali C via sjlee)

This commit is contained in:
Sangjin Lee 2016-07-14 15:19:03 -07:00
parent 5537c6b234
commit e549a9af31
1 changed files with 5 additions and 5 deletions

View File

@ -613,8 +613,8 @@ public class TestHBaseTimelineStorage {
TimelineMetric aggMetric = new TimelineMetric(); TimelineMetric aggMetric = new TimelineMetric();
aggMetric.setId("MEM_USAGE"); aggMetric.setId("MEM_USAGE");
Map<Long, Number> aggMetricValues = new HashMap<Long, Number>(); Map<Long, Number> aggMetricValues = new HashMap<Long, Number>();
ts = System.currentTimeMillis(); long aggTs = ts;
aggMetricValues.put(ts - 120000, 102400000L); aggMetricValues.put(aggTs - 120000, 102400000L);
aggMetric.setType(Type.SINGLE_VALUE); aggMetric.setType(Type.SINGLE_VALUE);
aggMetric.setRealtimeAggregationOp(TimelineMetricOperation.SUM); aggMetric.setRealtimeAggregationOp(TimelineMetricOperation.SUM);
aggMetric.setValues(aggMetricValues); aggMetric.setValues(aggMetricValues);
@ -819,9 +819,9 @@ public class TestHBaseTimelineStorage {
metric.getValues().get(ts - 20000)); metric.getValues().get(ts - 20000));
} }
if (metric.getId().equals("MEM_USAGE")) { if (metric.getId().equals("MEM_USAGE")) {
assertTrue(metric.getValues().containsKey(ts - 120000)); assertTrue(metric.getValues().containsKey(aggTs - 120000));
assertEquals(aggMetricValues.get(ts - 120000), assertEquals(aggMetricValues.get(aggTs - 120000),
metric.getValues().get(ts - 120000)); metric.getValues().get(aggTs - 120000));
} }
} }
} finally { } finally {