Bugzilla – Attachment 71673 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: Make OAI/Server.t tests use timestamps from the DB
Bug-20191-Make-OAIServert-tests-use-timestamps-fro.patch (text/plain), 1.67 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-02-15 17:15:04 UTC
(
hide
)
Description:
Bug 20191: Make OAI/Server.t tests use timestamps from the DB
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-02-15 17:15:04 UTC
Size:
1.67 KB
patch
obsolete
>From 4fb1083f3981b81ae0edc961b98db86da6bb3d27 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 15 Feb 2018 14:14:18 -0300 >Subject: [PATCH] Bug 20191: Make OAI/Server.t tests use timestamps from the DB > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/OAI/Server.t | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/OAI/Server.t b/t/db_dependent/OAI/Server.t >index def867bffe..be56bc3b0a 100644 >--- a/t/db_dependent/OAI/Server.t >+++ b/t/db_dependent/OAI/Server.t >@@ -30,7 +30,10 @@ use t::lib::Mocks; > > use C4::Biblio; > use C4::Context; >+ >+use Koha::Biblio::Metadatas; > use Koha::Database; >+use Koha::DateUtils; > > BEGIN { > use_ok('Koha::OAI::Server::DeletedRecord'); >@@ -344,14 +347,15 @@ subtest 'Bug 19725: OAI-PMH ListRecords and ListIdentifiers should use biblio_me > # Wait 1 second to be sure no timestamp will be equal to $from defined below > sleep 1; > >- my $from_dt = DateTime->now; >- my $from = $from_dt->ymd . 'T' . $from_dt->hms . 'Z'; >- > # Modify record to trigger auto update of timestamp > (my $biblionumber = $marcxml[0]->{header}->{identifier}) =~ s/^.*:(.*)/$1/; > my $record = GetMarcBiblio({biblionumber => $biblionumber}); > $record->append_fields(MARC::Field->new(999, '', '', z => '_')); >- ModBiblio($record, $biblionumber); >+ ModBiblio( $record, $biblionumber ); >+ my $from_dt = dt_from_string( >+ Koha::Biblio::Metadatas->search({ biblionumber => $biblionumber }) >+ ->next->timestamp ); >+ my $from = $from_dt->ymd . 'T' . $from_dt->hms . 'Z'; > $oaidc[0]->{header}->{datestamp} = $from; > > test_query( >-- >2.14.1
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