[Koha-bugs] [Bug 28632] patrons.t fragile on slow boxes
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Jul 9 14:41:35 CEST 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28632
Nick Clemens <nick at bywatersolutions.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #122460|0 |1
is obsolete| |
--- Comment #4 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 122739
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122739&action=edit
Bug 28632: Make patrons.t robust in terms of elapsed time between tests
This patch changes the tests so they don't try to compare updated_on
from many tests ago, so it is less fragile.
I added a warn on the unmatched fields for convenience.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass!
2. Make your computer very slow
3. Repeat 1
=> FAIL: You get things like:
t/db_dependent/api/v1/patrons.t .. 3/7
# Failed test 'Returned patron from update matches expected'
# at t/db_dependent/api/v1/patrons.t line 513.
# Structures begin differing at:
# $got->{updated_on} = '2021-06-25T14:26:20+00:00'
# $expected->{updated_on} = '2021-06-25T14:26:19+00:00'
# Looks like you failed 1 test of 42.
4. Apply this patch
5. Repeat 1
=> SUCCESS: Tests pass again!
6. Sign off :-D
Signed-off-by: David Nind <david at davidnind.com>
Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list