YAML 1.30 and YAML::Syck 1.32 introduce a breaking change : they won't bless loaded objects by default, and t/db_dependent/BackgroundJob.t fail when this feature is disabled. I don't know this module very well, but I think that the tests are broken. C4::BackgroundJob::fetch already bless the object returned from $session->param, so we don't need to test that $session->param returns a blessed object.
Created attachment 99756 [details] [review] 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)
Created attachment 99968 [details] [review] 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>
QAing
Created attachment 100248 [details] [review] 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>
Created attachment 100249 [details] [review] Bug 24760: (follow-up) Add a neighboring test messsage Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Nice work everyone! Pushed to master for 20.05
Backported to 19.11.x for 19.11.05
backported to 19.05.x for 19.05.10
Normal patch will not be backported to 18.11.x series