@@ -64,19 +64,19 @@ func TestOTLPMetrics(t *testing.T) {
6464 },
6565 {
6666 stat : types .StatisticMaximum ,
67- value : 2 ,
67+ value : 4 ,
6868 },
6969 {
7070 stat : types .StatisticSum ,
71- value : 12 , // we send Sum=2 six times in one minute
71+ value : 36 ,
7272 },
7373 {
7474 stat : types .StatisticAverage ,
75- value : 1 , // sum / samplecount = 2/2
75+ value : 1.5 ,
7676 },
7777 {
7878 stat : types .StatisticSampleCount ,
79- value : 12 , // we send Count=2 six times in one minute
79+ value : 24 ,
8080 },
8181 },
8282 },
@@ -114,7 +114,7 @@ func TestOTLPMetrics(t *testing.T) {
114114 },
115115 {
116116 stat : types .StatisticAverage ,
117- value : 1 ,
117+ value : 1 , // we send Sum=2, Count=2 every time
118118 },
119119 {
120120 stat : types .StatisticSampleCount ,
@@ -216,12 +216,12 @@ func TestOTLPMetrics(t *testing.T) {
216216 for _ , e := range m .expected {
217217 values , err := fetcher .Fetch (namespace , m .name , m .dimensions , e .stat , metric .MinuteStatPeriod )
218218 require .NoError (t , err )
219- require .GreaterOrEqual (t , len (values ), 3 , "Not enough metrics retrieved for namespace {%s} metric Name {%s} stat {%s}" , namespace , m .name , e .stat )
219+ assert .GreaterOrEqual (t , len (values ), 3 , "Not enough metrics retrieved for namespace {%s} metric Name {%s} stat {%s}" , namespace , m .name , e .stat )
220220
221221 // omit first/last metric as the 1m collection intervals may be missing data points from when the agent was started/stopped
222222 middleValues := values [1 : len (values )- 1 ]
223223 err = metric .IsAllValuesGreaterThanOrEqualToExpectedValueWithError (m .name , middleValues , e .value )
224- require .NoError (t , err )
224+ assert .NoError (t , err )
225225 }
226226 })
227227 }
0 commit comments