summaryrefslogtreecommitdiff
path: root/lib/Net/Ping
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2003-06-09 18:00:57 +0000
committerGurusamy Sarathy <gsar@cpan.org>2003-06-09 18:00:57 +0000
commit8eff326bc4ec5cde990026aa3a8ca58f85cb4bbc (patch)
tree4e3908033daa85663d9d09fc88629734b67672e8 /lib/Net/Ping
parentc2990482fb4d986615c32035b6b49c5a9a91336d (diff)
downloadperl-8eff326bc4ec5cde990026aa3a8ca58f85cb4bbc.tar.gz
one of the Net::Ping time-dependent tests fails sporadically
when the response from localhost is "too quick" p4raw-id: //depot/perl@19723
Diffstat (limited to 'lib/Net/Ping')
-rw-r--r--lib/Net/Ping/t/250_ping_hires.t6
1 files changed, 4 insertions, 2 deletions
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$/;