Changed test case to ensure sorting

Changed the test data in timers_multiple_times_even so make sure the
metrics are sorted before getting the median value. If the data was not
sorted, the median value would be 300 instead of 250.
This commit is contained in:
David Howell 2013-03-22 15:58:32 +10:30
Родитель 5c0ce673b6
Коммит 76c13f03fa
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -195,7 +195,7 @@ module.exports = {
},
timers_multiple_times_even: function(test) {
test.expect(1);
this.metrics.timers['a'] = [100, 200, 300, 400];
this.metrics.timers['a'] = [300, 200, 400, 100];
pm.process_metrics(this.metrics, 100, this.time_stamp, function(){});
timer_data = this.metrics.timer_data['a'];
test.equal(250, timer_data.median);