@@ -432,11 +432,11 @@ func TestPingGatherNative(t *testing.T) {
432432 PacketsSent : 5 ,
433433 PacketsRecv : 5 ,
434434 Rtts : []time.Duration {
435- 1 * time .Millisecond ,
436- 2 * time .Millisecond ,
437435 3 * time .Millisecond ,
438436 4 * time .Millisecond ,
437+ 1 * time .Millisecond ,
439438 5 * time .Millisecond ,
439+ 2 * time .Millisecond ,
440440 },
441441 },
442442 ttl : 1 ,
@@ -475,8 +475,11 @@ func TestPingGatherNative(t *testing.T) {
475475 assert .True (t , acc .HasPoint ("ping" , map [string ]string {"url" : "localhost" }, "packets_transmitted" , 5 ))
476476 assert .True (t , acc .HasPoint ("ping" , map [string ]string {"url" : "localhost" }, "packets_received" , 5 ))
477477 assert .True (t , acc .HasField ("ping" , "percentile50_ms" ))
478+ assert .Equal (t , float64 (3 ), acc .Metrics [0 ].Fields ["percentile50_ms" ])
478479 assert .True (t , acc .HasField ("ping" , "percentile95_ms" ))
480+ assert .Equal (t , float64 (4.799999 ), acc .Metrics [0 ].Fields ["percentile95_ms" ])
479481 assert .True (t , acc .HasField ("ping" , "percentile99_ms" ))
482+ assert .Equal (t , float64 (4.96 ), acc .Metrics [0 ].Fields ["percentile99_ms" ])
480483 assert .True (t , acc .HasField ("ping" , "percent_packet_loss" ))
481484 assert .True (t , acc .HasField ("ping" , "minimum_response_ms" ))
482485 assert .True (t , acc .HasField ("ping" , "average_response_ms" ))
0 commit comments