@@ -607,7 +607,7 @@ func TestExtraDimensionsLabels(t *testing.T) {
607607 Dimensions : extraDimensions ,
608608 LatencyHistogramBuckets : []time.Duration {time .Duration (0.1 * float64 (time .Second )), time .Duration (1 * float64 (time .Second )), time .Duration (10 * float64 (time .Second ))},
609609 Store : StoreConfig {MaxItems : 10 },
610- MetricsFlushInterval : & [] time.Duration { 0 }[ 0 ] ,
610+ MetricsFlushInterval : ptr ( time .Millisecond ) ,
611611 }
612612
613613 set := componenttest .NewNopTelemetrySettings ()
@@ -645,7 +645,7 @@ func TestVirtualNodeServerLabels(t *testing.T) {
645645 Store : StoreConfig {MaxItems : 10 },
646646 VirtualNodePeerAttributes : virtualNodeDimensions ,
647647 VirtualNodeExtraLabel : true ,
648- MetricsFlushInterval : & [] time.Duration { time . Millisecond }[ 0 ] ,
648+ MetricsFlushInterval : ptr ( time .Millisecond ) ,
649649 }
650650
651651 set := componenttest .NewNopTelemetrySettings ()
@@ -691,7 +691,7 @@ func TestVirtualNodeClientLabels(t *testing.T) {
691691 Store : StoreConfig {MaxItems : 10 },
692692 VirtualNodePeerAttributes : virtualNodeDimensions ,
693693 VirtualNodeExtraLabel : true ,
694- MetricsFlushInterval : & [] time.Duration { time . Millisecond }[ 0 ] ,
694+ MetricsFlushInterval : ptr ( time .Millisecond ) ,
695695 }
696696
697697 set := componenttest .NewNopTelemetrySettings ()
@@ -728,3 +728,8 @@ func TestVirtualNodeClientLabels(t *testing.T) {
728728 )
729729 require .NoError (t , err )
730730}
731+
732+ // ptr returns a pointer to the given value.
733+ func ptr [T any ](value T ) * T {
734+ return & value
735+ }
0 commit comments