2 # See the "Main" test package for documentation
4 package ZOOM::IRSpy::Test::Search::Bib1;
10 use ZOOM::IRSpy::Test;
11 our @ISA = qw(ZOOM::IRSpy::Test);
17 my @attrs = ( 1..63, 1000..1036, # Bib-1
18 1037..1096, 1185..1209, # Extended Bib-1
19 1097..1111, # Dublin-Core
23 foreach my $attr (@attrs) {
24 $conn->irspy_search_pqf("\@attr 1=$attr mineral",
25 {'attr' => $attr}, {},
26 ZOOM::Event::ZEND, \&found,
27 exception => \&error);
33 my($conn, $task, $test_args, $event) = @_;
34 my $attr = $test_args->{'attr'};
36 my $n = $task->{rs}->size();
37 $task->{rs}->destroy();
38 $conn->log("irspy_test", "search on access-point $attr found $n record",
40 update($conn, $attr, 1);
42 return ZOOM::IRSpy::Status::TASK_DONE;
47 my($conn, $task, $test_args, $exception) = @_;
48 my $attr = $test_args->{'attr'};
50 $task->{rs}->destroy();
51 $conn->log("irspy_test", "search on access-point $attr had error: ",
53 update($conn, $attr, 0);
54 zoom_error_timeout_update($conn, $exception);
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',