Skip to content
This repository has been archived by the owner on Oct 17, 2018. It is now read-only.

Commit

Permalink
Fix integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
Chao Wang committed Jun 12, 2017
1 parent dd7c404 commit c87d395
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions integration/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,29 +250,24 @@ func toExpectedResults(
aggTypes, err := decompressor.Decompress(policy.AggregationID)
require.NoError(t, err)

if aggTypes.IsDefault() {
switch mu.Type {
case unaggregated.CounterType:
// TODO(cw) use default aggregation types for Counter
case unaggregated.BatchTimerType:
aggTypes = testDefaultTimerAggregationTypes
case unaggregated.GaugeType:
// TODO(cw) use default aggregation types for Gauge
default:
require.Fail(t, fmt.Sprintf("unrecognized metric type %v", mu.Type))
}
}
metrics.aggTypes = aggTypes
aggregationOpts := aggregation.NewOptions()
aggregationOpts.ResetSetData(aggTypes)

if !exists {
switch mu.Type {
case unaggregated.CounterType:
// TODO(cw) Get default aggregation types for Counter.
aggregationOpts.ResetSetData(aggTypes)
values = aggregation.NewCounter(aggregationOpts)
case unaggregated.BatchTimerType:
if aggTypes.IsDefault() {
aggTypes = opts.DefaultTimerAggregationTypes()
}
aggregationOpts.ResetSetData(aggTypes)
values = aggregation.NewTimer(opts.TimerQuantiles(), opts.StreamOptions(), aggregationOpts)
case unaggregated.GaugeType:
// TODO(cw) Get default aggregation types for Gauge.
aggregationOpts.ResetSetData(aggTypes)
values = aggregation.NewGauge(aggregationOpts)
default:
require.Fail(t, fmt.Sprintf("unrecognized metric type %v", mu.Type))
Expand Down

0 comments on commit c87d395

Please sign in to comment.