Bugzilla – Attachment 183725 Details for
Bug 40265
t/db_dependent/OAI/Server.t is failing randomly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40265: (try to) prevent OAI/Server.t to fail on slow server
Bug-40265-try-to-prevent-OAIServert-to-fail-on-slo.patch (text/plain), 2.16 KB, created by
David Nind
on 2025-07-03 08:32:35 UTC
(
hide
)
Description:
Bug 40265: (try to) prevent OAI/Server.t to fail on slow server
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-07-03 08:32:35 UTC
Size:
2.16 KB
patch
obsolete
>From aebb456d95df866ad038743ee7c5aa4032349f7e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 3 Jul 2025 09:31:54 +0200 >Subject: [PATCH] Bug 40265: (try to) prevent OAI/Server.t to fail on slow > server > >Jenkins failed with: >21:50:07 koha_1 | # got : '2025-06-26T19:50:06Z' >21:50:07 koha_1 | # expect : '2025-06-26T19:50:07Z' > >A guess is that we change second between the 2 dt_from_string calls, and >the comparison fails. > >One thing however: it seems that we want to deal with timezone correctly >here, but if we change the timezone in koha-conf.xml, the tests fail... > >Signed-off-by: David Nind <david@davidnind.com> >--- > t/db_dependent/OAI/Server.t | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/OAI/Server.t b/t/db_dependent/OAI/Server.t >index 1c31c64e73..2dd27082e2 100755 >--- a/t/db_dependent/OAI/Server.t >+++ b/t/db_dependent/OAI/Server.t >@@ -677,7 +677,7 @@ subtest 'Tests for timestamp handling' => sub { > > my $utc_datetime = dt_from_string( undef, undef, 'UTC' ); > my $utc_timestamp = $utc_datetime->ymd . 'T' . $utc_datetime->hms . 'Z'; >- my $timestamp = dt_from_string( undef, 'sql' ); >+ my $timestamp = $utc_datetime; > > # Test a bib with one item > my $biblio1 = $builder->build_sample_biblio; >@@ -774,7 +774,7 @@ subtest 'Tests for timestamp handling' => sub { > > $utc_datetime = dt_from_string( undef, undef, 'UTC' ); > $utc_timestamp = $utc_datetime->ymd . 'T' . $utc_datetime->hms . 'Z'; >- $timestamp = dt_from_string( undef, 'sql' ); >+ $timestamp = $utc_datetime; > > my $item2 = $builder->build_sample_item( { biblionumber => $biblio1->biblionumber } ); > $sth_item->execute( $timestamp, $item2->itemnumber ); >@@ -808,7 +808,7 @@ subtest 'Tests for timestamp handling' => sub { > set_relative_time(10); > $utc_datetime = dt_from_string( undef, undef, 'UTC' ); > $utc_timestamp = $utc_datetime->ymd . 'T' . $utc_datetime->hms . 'Z'; >- $timestamp = dt_from_string( undef, 'sql' ); >+ $timestamp = $utc_datetime; > > $sth_metadata->execute( $timestamp, $biblio1->biblionumber ); > >-- >2.39.5
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 40265
:
183723
| 183725