@@ -292,7 +292,7 @@ void distributionSummaryWithHistogram() {
292292
293293 stepOverNStep (1 );
294294 ds .record (4 );
295- clock .addSeconds (otlpConfig ().step ().getSeconds () - 5 );
295+ clock .addSeconds (otlpConfig ().step ().toSeconds () - 5 );
296296
297297 metric = writeToMetric (ds );
298298 assertHistogram (writeToMetric (ds ), TimeUnit .MINUTES .toNanos (2 ), TimeUnit .MINUTES .toNanos (3 ), BaseUnits .BYTES , 1 ,
@@ -365,7 +365,7 @@ void testMetricsStartAndEndTime() {
365365 Function <Meter , NumberDataPoint > getDataPoint = (meter ) -> writeToMetric (meter ).getSum ().getDataPoints (0 );
366366 assertThat (getDataPoint .apply (counter ).getStartTimeUnixNano ()).isEqualTo (0 );
367367 assertThat (getDataPoint .apply (counter ).getTimeUnixNano ()).isEqualTo (60000000000L );
368- clock .addSeconds (otlpConfig ().step ().getSeconds () - 1 );
368+ clock .addSeconds (otlpConfig ().step ().toSeconds () - 1 );
369369 assertThat (getDataPoint .apply (counter ).getStartTimeUnixNano ()).isEqualTo (0 );
370370 assertThat (getDataPoint .apply (counter ).getTimeUnixNano ()).isEqualTo (60000000000L );
371371 clock .addSeconds (1 );
@@ -407,15 +407,15 @@ void scheduledRollOver() {
407407 assertThat (writeToMetric (functionTimer ).getHistogram ().getDataPoints (0 ).getSum ()).isEqualTo (16 );
408408 assertThat (writeToMetric (functionTimer ).getHistogram ().getDataPoints (0 ).getCount ()).isEqualTo (16 );
409409
410- clock .addSeconds (otlpConfig ().step ().getSeconds () / 2 );
410+ clock .addSeconds (otlpConfig ().step ().toSeconds () / 2 );
411411 // pollMeters should be idempotent within a time window
412412 registry .pollMetersToRollover ();
413413 assertSum (writeToMetric (counter ), TimeUnit .MINUTES .toNanos (1 ), TimeUnit .MINUTES .toNanos (2 ), 1 );
414414 assertThat (writeToMetric (functionCounter ).getSum ().getDataPoints (0 ).getAsDouble ()).isEqualTo (16 );
415415 assertThat (writeToMetric (functionTimer ).getHistogram ().getDataPoints (0 ).getSum ()).isEqualTo (16 );
416416 assertThat (writeToMetric (functionTimer ).getHistogram ().getDataPoints (0 ).getCount ()).isEqualTo (16 );
417417
418- clock .addSeconds (otlpConfig ().step ().getSeconds () / 2 );
418+ clock .addSeconds (otlpConfig ().step ().toSeconds () / 2 );
419419 registry .pollMetersToRollover ();
420420 assertSum (writeToMetric (counter ), TimeUnit .MINUTES .toNanos (2 ), TimeUnit .MINUTES .toNanos (3 ), 10 );
421421 assertThat (writeToMetric (functionCounter ).getSum ().getDataPoints (0 ).getAsDouble ()).isEqualTo (10 );
0 commit comments