Remove extraneous comment.
[irspy-moved-to-github.git] / lib / ZOOM / IRSpy / Test / Search / Bib1.pm
index 93bcd7a..d01fb5b 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Bib1.pm,v 1.5 2006-10-06 11:33:08 mike Exp $
+# $Id: Bib1.pm,v 1.8 2006-10-12 14:40:33 mike Exp $
 
 # See the "Main" test package for documentation
 
@@ -23,7 +23,7 @@ sub start {
                 1016,          # any
                 );
     foreach my $attr (@attrs) {
-       $conn->irspy_search_pqf("\@attr 1=$attr mineral",
+       $conn->irspy_search_pqf("\@attr 1=$attr mineral", $attr,
                                ZOOM::Event::RECV_SEARCH, \&found,
                                exception => \&error);
     }
@@ -31,16 +31,31 @@ sub start {
 
 
 sub found {
-    my($conn, $task, $event) = @_;
+    my($conn, $task, $attr, $event) = @_;
 
     my $n = $task->{rs}->size();
-    $conn->log("irspy_test", "search found $n record", $n==1 ? "" : "s");
-    my $rec = $conn->record();
-    $rec->append_entry("irspy:status", "<irspy:search_title ok='1'>" .
-                      isodate(time()) . "</irspy:search_title>");
+    $conn->log("irspy_test", "search on access-point $attr found $n record",
+              $n==1 ? "" : "s");
+    $conn->record()->append_entry("irspy:status",
+                                 "<irspy:search_bib1 ap='$attr' ok='1'>" .
+                                 isodate(time()) .
+                                 "</irspy:search_bib1>");
 
     return ZOOM::IRSpy::Status::TASK_DONE;
 }
 
 
+sub error {
+    my($conn, $task, $attr, $exception) = @_;
+
+    $conn->log("irspy_test", "search on access-point $attr had error: ",
+              $exception);
+    $conn->record()->append_entry("irspy:status",
+                                 "<irspy:search_bib1 ap='$attr' ok='0'>" .
+                                 isodate(time()) .
+                                 "</irspy:search_bib1>");
+    return ZOOM::IRSpy::Status::TASK_DONE;
+}
+
+
 1;