From b2d0c4fce7a09f71e2f9766df74314ff22436a98 Mon Sep 17 00:00:00 2001 From: "Matt T. Proud" Date: Sun, 21 Apr 2013 19:18:40 +0200 Subject: [PATCH] Stochastic test support plural SampleValueSeries. After SampleValue was refactored into SampleValueSeries, which involves plural values under a common super key, the stochastic test was never refreshed to reflect this reality. We had other tests that validated the functionality, but this one was insufficently forward-ported. --- storage/metric/stochastic_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/storage/metric/stochastic_test.go b/storage/metric/stochastic_test.go index 36314847b..3029a78a8 100644 --- a/storage/metric/stochastic_test.go +++ b/storage/metric/stochastic_test.go @@ -233,10 +233,12 @@ func levelDBGetRangeValues(l *LevelDBMetricPersistence, fp model.Fingerprint, i return nil, err } - samples = append(samples, model.SamplePair{ - Value: model.SampleValue(*retrievedValue.Value[0].Value), - Timestamp: indexable.DecodeTime(retrievedKey.Timestamp), - }) + for _, value := range retrievedValue.Value { + samples = append(samples, model.SamplePair{ + Value: model.SampleValue(*value.Value), + Timestamp: time.Unix(*value.Timestamp, 0), + }) + } } return