1 # $Id: Bib1.pm,v 1.18 2007-03-15 11:40:27 mike Exp $
3 # See the "Main" test package for documentation
5 package ZOOM::IRSpy::Test::Search::Bib1;
11 use ZOOM::IRSpy::Test;
12 our @ISA = qw(ZOOM::IRSpy::Test);
18 my @attrs = ( 1..63, 1000..1036, # Bib-1
19 1037..1096, 1185..1209, # Extended Bib-1
20 1097..1111, # Dublin-Core
24 foreach my $attr (@attrs) {
25 $conn->irspy_search_pqf("\@attr 1=$attr mineral",
26 {'attr' => $attr}, {},
27 ZOOM::Event::ZEND, \&found,
28 exception => \&error);
34 my($conn, $task, $test_args, $event) = @_;
35 my $attr = $test_args->{'attr'};
37 my $n = $task->{rs}->size();
38 $task->{rs}->destroy();
39 $conn->log("irspy_test", "search on access-point $attr found $n record",
41 update($conn, $attr, 1);
43 return ZOOM::IRSpy::Status::TASK_DONE;
48 my($conn, $task, $test_args, $exception) = @_;
49 my $attr = $test_args->{'attr'};
51 $task->{rs}->destroy();
52 $conn->log("irspy_test", "search on access-point $attr had error: ",
54 update($conn, $attr, 0);
56 return ZOOM::IRSpy::Status::TEST_BAD
57 if ($exception->code() == 1 || # permanent system error
58 $exception->code() == 235 || # Database does not exist
59 $exception->code() == 109); # Database unavailable
61 return ZOOM::IRSpy::Status::TASK_DONE;
66 my ($conn, $attr, $ok) = @_;
67 $conn->record()->store_result('search', 'set' => 'bib-1',