Bug 8519 - Make koha-index-daemon run on startup
[koha.git] / t / db_dependent / lib / KohaTest.pm
index 70c963d..f69e1cb 100644 (file)
@@ -625,11 +625,11 @@ sub reindex_marc {
         mkdir "$directory/$record_type";
         my $sth = $dbh->prepare($record_type eq "biblio" ? "SELECT marc FROM biblioitems" : "SELECT marc FROM auth_header");
         $sth->execute();
-        open OUT, ">:utf8", "$directory/$record_type/records";
+        open my $out, '>:encoding(UTF-8)', "$directory/$record_type/records";
         while (my ($blob) = $sth->fetchrow_array) {
-            print OUT $blob;
+            print {$out} $blob;
         }
-        close OUT;
+        close $out;
         my $zebra_server = "${record_type}server";
         my $zebra_config  = C4::Context->zebraconfig($zebra_server)->{'config'};
         my $zebra_db_dir  = C4::Context->zebraconfig($zebra_server)->{'directory'};
@@ -818,7 +818,7 @@ sub stop_zebrasrv {
 
 sub start_zebraqueue_daemon {
 
-    my $command = q(run/bin/koha-zebraqueue-ctl.sh start);
+    my $command = q(run/bin/koha-index-daemon-ctl.sh start);
     diag $command;
     my $started = system( $command );
     diag "started: $started";
@@ -832,7 +832,7 @@ sub start_zebraqueue_daemon {
 
 sub stop_zebraqueue_daemon {
 
-    my $command = q(run/bin/koha-zebraqueue-ctl.sh stop);
+    my $command = q(run/bin/koha-index-daemon-ctl.sh stop);
     diag $command;
     my $started = system( $command );
     diag "started: $started";