X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy%2FTest%2FRecord%2FFetch.pm;h=b63c22e99996b438bb0f64ac39b0e66f5b7446da;hp=6021ade6d06e985904baf1b9004023da9952e14e;hb=e0a6655b970c68a4b7d3995957d9d917d315a847;hpb=14e310391c30a8dc33d928be4a19bdd098651bca diff --git a/lib/ZOOM/IRSpy/Test/Record/Fetch.pm b/lib/ZOOM/IRSpy/Test/Record/Fetch.pm index 6021ade..b63c22e 100644 --- a/lib/ZOOM/IRSpy/Test/Record/Fetch.pm +++ b/lib/ZOOM/IRSpy/Test/Record/Fetch.pm @@ -1,4 +1,4 @@ -# $Id: Fetch.pm,v 1.11 2006-10-31 12:42:32 mike Exp $ +# $Id: Fetch.pm,v 1.15 2006-11-14 16:18:51 mike Exp $ # See the "Main" test package for documentation @@ -28,7 +28,10 @@ sub start { sub completed_search { my($conn, $task, $udata, $event) = @_; - $conn->log("irspy_test", "Fetch test search succeeded"); + my $n = $task->{rs}->size(); + $conn->log("irspy_test", "Fetch test search found $n records"); + return ZOOM::IRSpy::Status::TEST_SKIPPED if $n == 0; + my @syntax = ( 'canmarc', 'danmarc', @@ -86,12 +89,12 @@ sub record { } } else { $conn->log("irspy_test", "Retrieval of $syn record failed: ", - "exception unavailable"); + "(exception unavailable)"); } $conn->record()->store_result('record_fetch', 'syntax' => $syn, - 'ok' => defined $text); + 'ok' => defined $text ? 1 : 0); return ZOOM::IRSpy::Status::TASK_DONE; }