When the OAI-PMH:AutoUpdateSets syspref is disabled the t/db_dependent/OAI/Sets.t unit tests all pass successfully. But when the syspref is enabled then the unit test fail with this error: t/db_dependent/OAI/Sets.t .. 1/147 C4::OAI::Sets::AddOAISetsBiblios(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '39-46' for key 'PRIMARY' [for Statement " INSERT INTO oai_sets_biblios (set_id, biblionumber) VALUES (?,?) " with ParamValues: 0='46', 1=39] at t/db_dependent/OAI/Sets.t line 372 # Looks like your test exited with 255 just after 100. t/db_dependent/OAI/Sets.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 47/147 subtests
Created attachment 111050 [details] [review] Bug 26589: Fix t/db_dependent/OAI/Sets.t failing when OAI-PMH:AutoUpdateSets is enabled Test plan: 1. Check the OAI-PMH:AutoUpdateSets syspref is disabled 2. Run t/db_dependent/OAI/Sets.t tests and confirm tests pass successfully 3. Enabled the OAI-PMH:AutoUpdateSets syspref 4. Repeat step 2 and confirm the tests fail 5. Apply this patch and restart plack: sudo koha-plack --restart <instance> 6. Repeat step 2 and confirm the tests now pass 7. Disable the OAI-PMH:AutoUpdateSets syspref and repeat step 2 and confirm tests still pass Sponsored-By: Catalyst IT
Created attachment 111078 [details] [review] Bug 26589: Fix t/db_dependent/OAI/Sets.t failing when OAI-PMH:AutoUpdateSets is enabled Test plan: 1. Check the OAI-PMH:AutoUpdateSets syspref is disabled 2. Run t/db_dependent/OAI/Sets.t tests and confirm tests pass successfully 3. Enabled the OAI-PMH:AutoUpdateSets syspref 4. Repeat step 2 and confirm the tests fail 5. Apply this patch and restart plack: sudo koha-plack --restart <instance> 6. Repeat step 2 and confirm the tests now pass 7. Disable the OAI-PMH:AutoUpdateSets syspref and repeat step 2 and confirm tests still pass Sponsored-By: Catalyst IT Signed-off-by: David Nind <david@davidnind.com>
Created attachment 111538 [details] [review] Bug 26589: Fix t/db_dependent/OAI/Sets.t failing when OAI-PMH:AutoUpdateSets is enabled Test plan: 1. Check the OAI-PMH:AutoUpdateSets syspref is disabled 2. Run t/db_dependent/OAI/Sets.t tests and confirm tests pass successfully 3. Enabled the OAI-PMH:AutoUpdateSets syspref 4. Repeat step 2 and confirm the tests fail 5. Apply this patch and restart plack: sudo koha-plack --restart <instance> 6. Repeat step 2 and confirm the tests now pass 7. Disable the OAI-PMH:AutoUpdateSets syspref and repeat step 2 and confirm tests still pass Sponsored-By: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 20.11, thanks to everybody involved!
backported to 20.05.x for 20.05.06
backported to 19.11.x for 19.11.12
Backported to 19.05.x branch for 19.05.17