Bug 40265 - t/db_dependent/OAI/Server.t is failing randomly
Summary: t/db_dependent/OAI/Server.t is failing randomly
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 25551
  Show dependency treegraph
 
Reported: 2025-06-27 17:36 UTC by Lucas Gass (lukeg)
Modified: 2025-08-07 13:16 UTC (History)
7 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 40265: (try to) prevent OAI/Server.t to fail on slow server (2.11 KB, patch)
2025-07-03 07:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40265: (try to) prevent OAI/Server.t to fail on slow server (2.16 KB, patch)
2025-07-03 08:32 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2025-06-27 17:36:51 UTC
-Add something to OPACHiddenItems like withdrawn: [1]
-Have no items in your DB with that value 
-prove -v /kohadevbox/koha/t/db_dependent/OAI/Server.t

Tests fail
Comment 1 David Cook 2025-06-30 00:03:10 UTC
Hmm nope. Seems to work fine for me.
Comment 2 David Nind 2025-06-30 00:46:14 UTC
I couldn't replicate eiterh - the tests passed for me.
Comment 3 Jonathan Druart 2025-07-03 07:07:14 UTC
What was the error?

This one?

21:50:07 koha_1       |     #    got : '2025-06-26T19:50:06Z'
21:50:07 koha_1       |     # expect : '2025-06-26T19:50:07Z'

this is "expected" we should not compare timestamp without using t::lib::Dates::compare
Comment 4 Jonathan Druart 2025-07-03 07:33:41 UTC
Created attachment 183723 [details] [review]
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...
Comment 5 David Nind 2025-07-03 08:32:35 UTC
Created attachment 183725 [details] [review]
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>
Comment 6 Marcel de Rooy 2025-08-07 13:03:16 UTC
not ok 34 - Tests for timestamp handling
#   Failed test 'Tests for timestamp handling'
#   at t/db_dependent/OAI/Server.t line 992.
Comment 7 Marcel de Rooy 2025-08-07 13:04:11 UTC
(In reply to Marcel de Rooy from comment #6)
> not ok 34 - Tests for timestamp handling
> #   Failed test 'Tests for timestamp handling'
> #   at t/db_dependent/OAI/Server.t line 992.

Wait. Could be my timezone..
Comment 8 Marcel de Rooy 2025-08-07 13:16:09 UTC
Still failing on Etc/UTC with me