projects
/
irspy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reinstate so-called Bath search as part of Quick suite.
[irspy-moved-to-github.git]
/
lib
/
ZOOM
/
IRSpy
/
Test
/
Search
/
Boolean.pm
diff --git
a/lib/ZOOM/IRSpy/Test/Search/Boolean.pm
b/lib/ZOOM/IRSpy/Test/Search/Boolean.pm
index
6fe68fb
..
ea8233a
100644
(file)
--- a/
lib/ZOOM/IRSpy/Test/Search/Boolean.pm
+++ b/
lib/ZOOM/IRSpy/Test/Search/Boolean.pm
@@
-1,4
+1,3
@@
-# $Id: Boolean.pm,v 1.1 2006-10-25 10:08:50 sondberg Exp $
# See the "Main" test package for documentation
# See the "Main" test package for documentation
@@
-24,8
+23,8
@@
sub start {
foreach my $operator (keys %pqfs) {
$conn->irspy_search_pqf($pqfs{$operator},
foreach my $operator (keys %pqfs) {
$conn->irspy_search_pqf($pqfs{$operator},
- {'operator' => $operator},
- ZOOM::Event::RECV_SEARCH, \&found,
+ {'operator' => $operator}, {},
+ ZOOM::Event::ZEND, \&found,
exception => \&error);
}
}
exception => \&error);
}
}
@@
-34,12
+33,12
@@
sub start {
sub found {
my($conn, $task, $test_args, $event) = @_;
my $operator = $test_args->{'operator'};
sub found {
my($conn, $task, $test_args, $event) = @_;
my $operator = $test_args->{'operator'};
- my $n = $task->{rs}->size();
+ my $n = $task->{rs}->size();
+ $task->{rs}->destroy();
$conn->log("irspy_test", "search using boolean operator ", $operator,
" found $n record", $n==1 ? "" : "s");
$conn->log("irspy_test", "search using boolean operator ", $operator,
" found $n record", $n==1 ? "" : "s");
- $conn->record()->store_result('boolean', 'operator' => $operator,
- 'ok' => 1);
+ update($conn, $operator, 1);
return ZOOM::IRSpy::Status::TASK_DONE;
}
return ZOOM::IRSpy::Status::TASK_DONE;
}
@@
-49,12
+48,21
@@
sub error {
my($conn, $task, $test_args, $exception) = @_;
my $operator = $test_args->{'operator'};
my($conn, $task, $test_args, $exception) = @_;
my $operator = $test_args->{'operator'};
+ $task->{rs}->destroy();
$conn->log("irspy_test", "search using boolean operator ", $operator,
" had error: ", $exception);
$conn->log("irspy_test", "search using boolean operator ", $operator,
" had error: ", $exception);
- $conn->record()->store_result('boolean', 'operator' => $operator,
- 'ok' => 0);
+ update($conn, $operator, 0);
+ zoom_error_timeout_update($conn, $exception);
return ZOOM::IRSpy::Status::TASK_DONE;
}
return ZOOM::IRSpy::Status::TASK_DONE;
}
+sub update {
+ my ($conn, $operator, $ok) = @_;
+
+ $conn->record()->store_result('boolean', 'operator' => $operator,
+ 'ok' => $ok);
+}
+
+
1;
1;