> On Oct. 9, 2014, 2:46 p.m., Bill Farner wrote: > > src/test/java/org/apache/aurora/scheduler/sla/MetricCalculatorTest.java, > > line 59 > > <https://reviews.apache.org/r/26376/diff/1/?file=714221#file714221line59> > > > > Can you instead export these values into a Map<String, AtomicLong> and > > validate the full map at the end? That would firm up the value checking > > here. > > > > Something like: > > > > expect(...makeGauge(..)).andAnswer( > > new IAnswer<..>() { > > ... > > AtomicLong value = new AtomicLong(). > > map.put(key, value). > > return new StatImpl()...; > > }
Thought about that but it would require hardcoding all 27 of currently exposed metrics along with their values. I have modified a bit to fully validate metric names instead. That's the only validation suitable for this test. Values are asserted in SlaAlgorithmTest. - Maxim ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/26376/#review55984 ----------------------------------------------------------- On Oct. 6, 2014, 7:10 p.m., Maxim Khutornenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/26376/ > ----------------------------------------------------------- > > (Updated Oct. 6, 2014, 7:10 p.m.) > > > Review request for Aurora and Bill Farner. > > > Bugs: AURORA-774 > https://issues.apache.org/jira/browse/AURORA-774 > > > Repository: aurora > > > Description > ------- > > Implementing non-prod MTTA/R SLA metrics. > > > Diffs > ----- > > src/main/java/org/apache/aurora/scheduler/sla/MetricCalculator.java > dca680415426be2bc760875d5774c9e9399ea94b > src/main/java/org/apache/aurora/scheduler/sla/SlaAlgorithm.java > 33b6bbe4b39d516595276128bbfa0686d0bb9cbd > src/test/java/org/apache/aurora/scheduler/sla/MetricCalculatorTest.java > aeb90bbb822254cbe4691e45092b9581596ad800 > src/test/java/org/apache/aurora/scheduler/sla/SlaTestUtil.java > 96a04389e6b14c4d1c0bdb4d06abc046e7ea2151 > > Diff: https://reviews.apache.org/r/26376/diff/ > > > Testing > ------- > > ./gradlew -Pq build > > > Thanks, > > Maxim Khutornenko > >