[Koha-bugs] [Bug 24760] BackgroundJob tests fail with latest versions of YAML or YAML::Syck

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Mar 2 23:55:17 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24760

Michal Denar <black23 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #99756|0                           |1
        is obsolete|                            |

--- Comment #2 from Michal Denar <black23 at gmail.com> ---
Created attachment 99968
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99968&action=edit
Bug 24760: Use C4::BackgroundJob->fetch in tests

Starting with YAML 1.30 and YAML::Syck 1.32, these modules don't bless
loaded objects by default. This is not a problem as
C4::BackgroundJob->fetch bless them anyway.

So, instead of testing what's in the session, test the result of
C4::BackgroundJob->fetch, which is what's used everywhere else

Test plan:
1. Install latest version of YAML::Syck (or YAML if YAML::Syck is not
installed)
2. prove t/db_dependent/BackgroundJob.t => should FAIL
3. Apply patch
4. prove t/db_dependent/BackgroundJob.t => should PASS
5. Verify that background jobs are still working (for instance,
tools/batchMod.pl)

Signed-off-by: Michal Denar <black23 at gmail.com>

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list