X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy%2FTest%2FSearch%2FExplain.pm;fp=lib%2FZOOM%2FIRSpy%2FTest%2FSearch%2FExplain.pm;h=28a18da4b7d624e7a90c75fdc921218f7a6ec40a;hp=299ee69045964ed61ae7c52e4ecf7515fcfa52a2;hb=adf4375f42066dd4498c08b68b9a784dd4ea7eac;hpb=7705f9616556c945a95fe5dc256ab5e5443179da diff --git a/lib/ZOOM/IRSpy/Test/Search/Explain.pm b/lib/ZOOM/IRSpy/Test/Search/Explain.pm index 299ee69..28a18da 100644 --- a/lib/ZOOM/IRSpy/Test/Search/Explain.pm +++ b/lib/ZOOM/IRSpy/Test/Search/Explain.pm @@ -1,4 +1,4 @@ -# $Id: Explain.pm,v 1.6 2007-03-05 12:15:11 mike Exp $ +# $Id: Explain.pm,v 1.7 2007-03-15 11:41:24 mike Exp $ # See the "Main" test package for documentation @@ -34,14 +34,12 @@ sub start { sub found { my($conn, $task, $test_args, $event) = @_; my $category = $test_args->{'category'}; - my $n = $task->{rs}->size(); - my $ok = 0; + my $n = $task->{rs}->size(); + $task->{rs}->destroy(); + my $ok = ($n > 0); $conn->log("irspy_test", "Explain category ", $category, " gave ", $n, " hit(s)."); - if ($n > 0) { - $ok = 1; - } update($conn, $category, $ok); @@ -53,6 +51,7 @@ sub error { my($conn, $task, $test_args, $exception) = @_; my $category = $test_args->{'category'}; + $task->{rs}->destroy(); $conn->log("irspy_test", "Explain category lookup failed: ", $exception); update($conn, $category, 0);