1 # $Id: Ping.pm,v 1.6 2006-07-18 10:40:13 mike Exp $
3 # See the "Main" test package for documentation
5 package ZOOM::IRSpy::Test::Ping;
11 use ZOOM::IRSpy::Test;
13 @ISA = qw(ZOOM::IRSpy::Test);
18 my $irspy = $this->irspy();
19 my $pod = $irspy->pod();
21 $pod->callback(ZOOM::Event::CONNECT, \&connected);
22 $pod->callback("exception", \¬_connected);
23 my $err = $pod->wait($irspy);
29 sub connected { maybe_connected(@_, 1) }
30 sub not_connected { maybe_connected(@_, 0) }
33 my($conn, $irspy, $rs, $event, $ok) = @_;
35 my $rec = $irspy->record($conn);
36 $irspy->log("irspy_test", $conn->option("host"),
37 ($ok ? "" : " not"), " connected");
38 $rec->failed(1) if !$ok;
39 ### At this point we should note the successful connection in $rec