Bugzilla – Attachment 72009 Details for
Bug 20191
OAI/Server.t still fails on slow servers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20191: Try and fix random failure from Server.t - v3...
Bug-20191-Try-and-fix-random-failure-from-Servert-.patch (text/plain), 1.96 KB, created by
Jonathan Druart
on 2018-02-20 18:08:50 UTC
(
hide
)
Description:
Bug 20191: Try and fix random failure from Server.t - v3...
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-02-20 18:08:50 UTC
Size:
1.96 KB
patch
obsolete
>From 156af11f6f7ba71fa59eb9a647b72650df39bee8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 20 Feb 2018 15:08:31 -0300 >Subject: [PATCH] Bug 20191: Try and fix random failure from Server.t - v3... > >--- > t/db_dependent/OAI/Server.t | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/t/db_dependent/OAI/Server.t b/t/db_dependent/OAI/Server.t >index 87d5c8b557..31006bd25e 100644 >--- a/t/db_dependent/OAI/Server.t >+++ b/t/db_dependent/OAI/Server.t >@@ -21,6 +21,7 @@ use Modern::Perl; > > use Test::More tests => 29; > use DateTime; >+use Time::Fake; > use Test::MockModule; > use Test::Warn; > use XML::Simple; >@@ -57,6 +58,9 @@ my %param; > my $module = Test::MockModule->new('CGI'); > $module->mock('Vars', sub { %param; }); > >+ >+Time::Fake->offset( dt_from_string->epoch ); >+ > my $schema = Koha::Database->schema; > $schema->storage->txn_begin; > my $dbh = C4::Context->dbh; >@@ -72,7 +76,6 @@ $dbh->do('DELETE FROM oai_sets'); > my $date_added = DateTime->now() . 'Z'; > my $date_to = substr($date_added, 0, 10) . 'T23:59:59Z'; > my (@header, @marcxml, @oaidc); >-my $sth = $dbh->prepare('SELECT timestamp FROM biblioitems WHERE biblionumber=?'); > > # Add biblio records > foreach my $index ( 0 .. NUMBER_OF_MARC_RECORDS - 1 ) { >@@ -85,12 +88,9 @@ foreach my $index ( 0 .. NUMBER_OF_MARC_RECORDS - 1 ) { > $record->append_fields( MARC::Field->new('245', '', '', 'a' => "Title $index" ) ); > } > my ($biblionumber) = AddBiblio($record, ''); >- $sth->execute($biblionumber); >- my $timestamp = $sth->fetchrow_array . 'Z'; >- $timestamp =~ s/ /T/; > $record = GetMarcBiblio({ biblionumber => $biblionumber }); > $record = XMLin($record->as_xml_record); >- push @header, { datestamp => $timestamp, identifier => "TEST:$biblionumber" }; >+ push @header, { datestamp => $date_added, identifier => "TEST:$biblionumber" }; > my $dc = { > 'dc:title' => "Title $index", > 'dc:language' => "lng", >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20191
:
71673
|
71816
|
72009
|
73669
|
73684
|
73685