+
+ # Here I want to get a use attribute from the session, which we've
+ # managed to search for in the Search/Bib1 or Search/Dan1 tests.
+ # But how? So far we search for title: 1=4
+ $conn->irspy_search_pqf($queries[0], { queryindex => 0 }, {},
+ ZOOM::Event::RECV_SEARCH, \&completed_search,
+ exception => \&error);
+}
+
+
+sub completed_search {
+ my($conn, $task, $udata, $event) = @_;
+
+ my $n = $task->{rs}->size();
+ $conn->log("irspy_test", "Fetch test search found $n records");
+ if ($n == 0) {
+ my $n = $udata->{queryindex}+1;
+ my $q = $queries[$n];
+ if (defined $q) {
+ $conn->log("irspy_test", "Trying another search ...");
+ $conn->irspy_search_pqf($queries[$n], { queryindex => $n }, {},
+ ZOOM::Event::RECV_SEARCH, \&completed_search,
+ exception => \&error);
+ return ZOOM::IRSpy::Status::TASK_DONE;
+ } else {
+ return ZOOM::IRSpy::Status::TEST_SKIPPED;
+ }
+ }
+