[Bug 30203] New: Can we trust the clean slate in Circulation.t ?
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30203 Bug ID: 30203 Summary: Can we trust the clean slate in Circulation.t ? Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org Not sure what happened exactly. But a failing Circulation.t must have removed all users in my devbox. # Start with a clean slate $dbh->do('DELETE FROM issues'); $dbh->do('DELETE FROM borrowers'); And my borrowers: select borrowernumber,userid,lastseen from borrowers; +----------------+---------------------------------------------------------------------------+---------------------+ | borrowernumber | userid | lastseen | +----------------+---------------------------------------------------------------------------+---------------------+ | 382 | pCITR3m30mWAv4MTsEhckB0QR1JoJFgBac2mdWx | 2022-03-01 13:01:39 | | 383 | sazlgFEfa4UmwVgniArAfluzcETJXkru9ktdHKYzSqTXwYckCAXNje3ZpqfRabaz42p | 2022-03-01 13:01:39 | | 384 | VkGSPpUO7VFE2it55nZ2pflAmo75HUin4eYVKtThczB7tUF_AZFXuOcg95_Q | 2022-03-01 13:01:39 | | 385 | opoi06B6_LWhoOXQtTjYrN01Vm182og8OK6Uaezc_CfNnA6SYicmnWzb2hEeZF_ | 2022-03-01 13:01:39 | | 386 | john.renewal | NULL | | 387 | katrin.reservation | NULL | | 388 | kyle.reservation | NULL | | 389 | alice.reservation | NULL | | 390 | ca.glisse | NULL | | 391 | T5MrUI8DftRsa_nou6Q_VO76Wby4HAfcDsNP9WXk3gom8 | 2022-03-01 13:01:39 | | 392 | goV_DQYtptbpxYFdUtEcpJqz9X4fq3Zn4Arf336wEvxvc7rF8prBsQRDLq8_8FZhQypuamFi | 2022-03-01 13:01:39 | | 393 | fridolyn.somers | NULL | | 394 | kyle.hall | NULL | | 395 | kyle.hall1 | NULL | | 396 | chelsea.hall | NULL | | 397 | fn.dn | NULL | etc etc The family Hall are prominently visible now :) But Katrin and Fridolin too.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30203 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Hmm. I should have known. One of the last subtests calls SendCirculationAlert.. And that sub includes one of the worst Koha hacks: # LOCK TABLES is not transaction-safe and implicitly commits any active transaction before attempting to lock the tables. # If the LOCK/UNLOCK statements are executed from tests, the current transaction will be committed. # To avoid that we need to guess if this code is execute from tests or not (yes it is a bit hacky) my $do_not_lock = ( exists $ENV{_} && $ENV{_} =~ m|prove| ) || $ENV{KOHA_TESTING}; I will send a patch instead of closing this report btw. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30203 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Can we trust the clean |Prevent data loss when |slate in Circulation.t ? |running Circulation.t | |without prove -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30203 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30203 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30203 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 131314 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131314&action=edit Bug 30203: Circulation.t: prevent locking by setting envvar Running this test without prove is disastrous. The LOCK in the called SendCirculationAlert will ruin your data. But no longer when you apply this patch. Test plan: Run prove Circulation.t Inspect your data (e.g. borrowers table). Run perl Circulation.t Inspect your data (e.g. borrowers table) again. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30203 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- This is a trivial edit but really handy to keep you focus on development instead of reinstalling or restoring db. Very trivial: Self SO -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30203 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131314|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 131315 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131315&action=edit Bug 30203: Circulation.t: prevent locking by setting envvar Running this test without prove is disastrous. The LOCK in the called SendCirculationAlert will ruin your data. But no longer when you apply this patch. Test plan: Run prove Circulation.t Inspect your data (e.g. borrowers table). Run perl Circulation.t Inspect your data (e.g. borrowers table) again. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30203 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |martin.renvoize@ptfs-europe | |.com --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Fix is clear and test plan works as expected. PQA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30203 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30203 --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30203 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.05.00 |22.05.00,21.11.4,21.05.13 released in| | Status|Pushed to master |Pushed to stable CC| |andrew@bywatersolutions.com --- Comment #7 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- I see this is in 21.11.x for 21.11.4 Pushed to 21.05.x for 21.05.13 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30203 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30203 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.05.00,21.11.4,21.05.13 |22.05.00,21.11.04,21.05.13 released in| | Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED CC| |victor@tuxayo.net --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org