Bug 24760: Use C4::BackgroundJob->fetch in tests
authorJulian Maurice <julian.maurice@biblibre.com>
Fri, 28 Feb 2020 13:22:34 +0000 (14:22 +0100)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 9 Apr 2020 20:43:38 +0000 (20:43 +0000)
commit3f556c45695781cc50fa746975550af7818c7f32
tree2b86dfc518f8f83b73f191087d7ce48310028c18
parentbcf6cdb6eaa683adcd0cf2c51f229b5f0942ddac
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@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c1c3cfed5ca2709b99587e8907b68d158ce013f9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
t/db_dependent/BackgroundJob.t