2 # See the "Main" test package for documentation
4 package ZOOM::IRSpy::Test::Search::Explain;
10 use ZOOM::IRSpy::Test;
11 our @ISA = qw(ZOOM::IRSpy::Test);
17 my @explain = qw(CategoryList TargetInfo DatabaseInfo SchemaInfo TagSetInfo
18 RecordSyntaxInfo AttributeSetInfo TermListInfo
19 ExtendedServicesInfo AttributeDetails TermListDetails
20 ElementSetDetails RetrivalRecordDetails SortDetails
21 Processing VariantSetInfo UnitSet);
23 foreach my $category (@explain) {
24 $conn->irspy_search_pqf('@attr exp-1 1=1 ' . $category,
25 {'category' => $category},
26 { databaseName => 'IR-Explain-1' },
27 ZOOM::Event::ZEND, \&found,
28 exception => \&error);
34 my($conn, $task, $test_args, $event) = @_;
35 my $category = $test_args->{'category'};
37 my $n = $task->{rs}->size();
38 $task->{rs}->destroy();
40 $conn->log("irspy_test", "Explain category ", $category, " gave ", $n,
43 update($conn, $category, $ok);
45 return ZOOM::IRSpy::Status::TASK_DONE;
50 my($conn, $task, $test_args, $exception) = @_;
51 my $category = $test_args->{'category'};
53 $task->{rs}->destroy();
54 $conn->log("irspy_test", "Explain category lookup failed: ", $exception);
55 update($conn, $category, 0);
56 zoom_error_timeout_update($conn, $exception);
58 return ZOOM::IRSpy::Status::TEST_GOOD
59 if ($exception->code() == 109 || # Database unavailable
60 $exception->code() == 235); # Database does not exist
62 return ZOOM::IRSpy::Status::TASK_DONE;
67 my ($conn, $category, $ok) = @_;
68 $conn->record()->store_result('explain', 'category' => $category,