From 8eff326bc4ec5cde990026aa3a8ca58f85cb4bbc Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Mon, 9 Jun 2003 18:00:57 +0000 Subject: one of the Net::Ping time-dependent tests fails sporadically when the response from localhost is "too quick" p4raw-id: //depot/perl@19723 --- lib/Net/Ping/t/250_ping_hires.t | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/Net/Ping/t/250_ping_hires.t b/lib/Net/Ping/t/250_ping_hires.t index 52dae1ba75..91e905fb26 100644 --- a/lib/Net/Ping/t/250_ping_hires.t +++ b/lib/Net/Ping/t/250_ping_hires.t @@ -57,5 +57,7 @@ my ($ret, $duration) = $p -> ping("localhost"); ok $ret; # It is extremely likely that the duration contains a decimal -# point if Time::HiRes is functioning properly. -ok $duration =~ /\./; +# point if Time::HiRes is functioning properly, except when it +# it is fast enough to be "zero". +print "# duration=[$duration]\n"; +ok $duration =~ /\.|^0$/; -- cgit v1.2.1