From: Galen Charlton <[EMAIL PROTECTED]>

The add_biblios() routine now reindexes all bibs
in batch instead of waiting for zebraqueue_daemon - this
is moderately faster.  A separate set of test
cases for zebraqueue_deamon will be witten.

No documentation changes.

Signed-off-by: Andrew Moore <[EMAIL PROTECTED]>
---
 t/lib/KohaTest.pm |   26 +++++++-------------------
 1 files changed, 7 insertions(+), 19 deletions(-)

diff --git a/t/lib/KohaTest.pm b/t/lib/KohaTest.pm
index 8c857c9..8ff9fd0 100644
--- a/t/lib/KohaTest.pm
+++ b/t/lib/KohaTest.pm
@@ -435,27 +435,15 @@ sub add_biblios {
         }
         push @{$self->{'biblios'}}, $biblionumber;
     }
-    
+   
+    $self->reindex_marc(); 
     my $query = 'Finn Test';
-
-    # XXX we're going to repeatedly try to fetch the marc records that
-    # we inserted above. It may take a while before they all show
-    # up. why?
-    my $tries = 30;
-    DELAY: foreach my $trial ( 1..$tries ) {
-        diag "waiting for zebra indexing. Trial: $trial of $tries";
-        my ( $error, $results ) = SimpleSearch( $query );
-        if ( $param{'count'} <= scalar( @$results ) ) {
-            ok( $tries, "found all $param{'count'} titles after $trial tries" 
);
-            last DELAY;
-        }
-        sleep( 3 );
-    } continue {
-        if ( $trial == $tries ) {
-            fail( "we never found all $param{'count'} titles even after $tries 
tries." );
-        }
+    my ( $error, $results ) = SimpleSearch( $query );
+    if ( $param{'count'} <= scalar( @$results ) ) {
+        pass( "found all $param{'count'} titles" );
+    } else {
+        fail( "we never found all $param{'count'} titles" );
     }
-
     
 }
 
-- 
1.5.6

_______________________________________________
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to