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> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Change looks good, but does not work for another timezone. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> (cherry picked from commit73719c417f) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> (cherry picked from commita712b68635) Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This commit is contained in:
parent
128c28163b
commit
873aa29f66
|
|
@ -611,7 +611,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;
|
||||
|
|
@ -711,7 +711,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(
|
||||
{
|
||||
|
|
@ -749,7 +749,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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue