X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=t%2F16-packages.t;h=6c09bcff5ea2191a8272e988edf4013a61474510;hb=b81a8735959cacfdae3c28fc5646627c27c28ec2;hp=d9ac42b4c60c1d1e10035779a4a3accf69ebc8f4;hpb=1ca1d4abecce01941183fa3bed64df468b43c50d;p=ZOOM-Perl-moved-to-github.git diff --git a/t/16-packages.t b/t/16-packages.t index d9ac42b..6c09bcf 100644 --- a/t/16-packages.t +++ b/t/16-packages.t @@ -1,4 +1,4 @@ -# $Id: 16-packages.t,v 1.9 2005-12-13 17:35:51 mike Exp $ +# $Id: 16-packages.t,v 1.12 2006-04-12 12:30:09 mike Exp $ # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 16-packages.t' @@ -20,7 +20,7 @@ BEGIN { use_ok('Net::Z3950::ZOOM') }; # We will create, and destroy, a new database with a random name -my $host = "test.indexdata.com:8017"; +my $host = "test.indexdata.com:2118"; my $dbname = join("", map { chr(ord("a") + int(rand(26))) } 1..10); # Connect anonymously, and expect this to fail @@ -66,8 +66,7 @@ count_hits($conn, "the", 0, 2); dropdb($conn, $dbname, 0); # A second dropping should fail, as the database is no longer there. -### But at present, it's "always successful" (though not really) -dropdb($conn, $dbname, 0); +dropdb($conn, $dbname, 10004); sub makeconn { @@ -131,9 +130,7 @@ sub dropdb { my $p = Net::Z3950::ZOOM::connection_package($conn, $o); # No need to keep ok()ing this, or checking the option-setting Net::Z3950::ZOOM::package_option_set($p, databaseName => $dbname); - - ### Don't send the package at the moment -- it corrupts Zebra - #Net::Z3950::ZOOM::package_send($p, "drop"); + Net::Z3950::ZOOM::package_send($p, "drop"); my($errcode, $errmsg, $addinfo) = (undef, "dummy", "dummy"); $errcode = Net::Z3950::ZOOM::connection_error($conn, $errmsg, $addinfo); ok($errcode == $expected_error,