[Bug 16500] New: Replace two warns in TestBuilder.t with warning_like
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 Bug ID: 16500 Summary: Replace two warns in TestBuilder.t with warning_like Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: m.de.rooy@rijksmuseum.nl QA Contact: gmcharlt@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Replace two warns in |Catch two warns in |TestBuilder.t with |TestBuilder.t with |warning_like |warning_like -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |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=16500 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 51437 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51437&action=edit Bug 16500: Catch two warns in TestBuilder.t with warning_like When testing a wrong case in TestBuilder.t, two warns show up. We can catch them with warning_like. Test plan: Run t/db_dependent/TestBuilder.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com 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=16500 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51437|0 |1 is obsolete| | --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 51770 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51770&action=edit Bug 16500: Catch two warns in TestBuilder.t with warning_like When testing a wrong case in TestBuilder.t, two warns show up. We can catch them with warning_like. Test plan: Run t/db_dependent/TestBuilder.t Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I get 3 without the patch and 1 remains with the patch applied, is it expected? t/db_dependent/TestBuilder.t .. 1/9 Violation of unique constraint in Branch at t/lib/TestBuilder.pm line 201. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #3)
I get 3 without the patch and 1 remains with the patch applied, is it expected?
t/db_dependent/TestBuilder.t .. 1/9 Violation of unique constraint in Branch at t/lib/TestBuilder.pm line 201.
Thanks. $ prove t/db_dependent/TestBuilder.t t/db_dependent/TestBuilder.t .. ok All tests successful. Files=1, Tests=9, 7 wallclock secs ( 0.06 usr 0.00 sys + 6.48 cusr 0.13 csys = 6.67 CPU) Result: PASS I had no warnings, because I had no MPL branch. And the patch only catches the second build on line 57. If you do have one, the warning comes from line 56. Will send a small follow-up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 51851 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51851&action=edit Bug 16500: [QA Follow-up] Catch warning if branch MPL already exists The current test had no warnings, when you have no MPL branch, and only catches the warn from the second build on line 57. If you do have MPL, a warning comes from line 56. This patch quickly fixes it. Report 16607 will propose a general solution. Test plan: Do not yet apply the patch. Add MPL branch. Run the test. Notice the warning about Branch. Apply the patch. Run the test. Warning gone? 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=16500 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16607 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |16607 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16607 [Bug 16607] Add quiet flag to builder sub in TestBuilder -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 52229 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52229&action=edit [COUNTER-PATCH] Bug 16500: Do not try to insert MPL if already exists -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #6)
Created attachment 52229 [details] [review] [COUNTER-PATCH] Bug 16500: Do not try to insert MPL if already exists
Marcel, what about this patch to replace your second patch? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #7)
(In reply to Jonathan Druart from comment #6)
Created attachment 52229 [details] [review] [review] [COUNTER-PATCH] Bug 16500: Do not try to insert MPL if already exists
Marcel, what about this patch to replace your second patch?
That would obviously work fine too, but I'd rather replace it by one line in the dependent patch (16607). So I prefer to keep the original one.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51851|0 |1 is obsolete| | Attachment #52229|0 |1 is obsolete| | --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 52300 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52300&action=edit Bug 16500: [QA Follow-up] Catch warning if branch MPL already exists The current test had no warnings, when you have no MPL branch, and only catches the warn from the second build on line 57. If you do have MPL, a warning comes from line 56. This patch fixes it by removing MPL from the test. A new branch is created first and then we try to create it again. Test plan: Run the test. 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=16500 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #8)
(In reply to Jonathan Druart from comment #7)
(In reply to Jonathan Druart from comment #6)
Created attachment 52229 [details] [review] [review] [review] [COUNTER-PATCH] Bug 16500: Do not try to insert MPL if already exists
Marcel, what about this patch to replace your second patch?
That would obviously work fine too, but I'd rather replace it by one line in the dependent patch (16607). So I prefer to keep the original one..
I finally decided to go for the third patch :) and remove MPL completely. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|16607 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16607 [Bug 16607] Add quiet flag to builder sub in TestBuilder -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51770|0 |1 is obsolete| | --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 52335 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52335&action=edit Bug 16500: Catch two warns in TestBuilder.t with warning_like When testing a wrong case in TestBuilder.t, two warns show up. We can catch them with warning_like. Test plan: Run t/db_dependent/TestBuilder.t Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52335|0 |1 is obsolete| | --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 52336 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52336&action=edit Bug 16500: Catch two warns in TestBuilder.t with warning_like When testing a wrong case in TestBuilder.t, two warns show up. We can catch them with warning_like. Test plan: Run t/db_dependent/TestBuilder.t Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52300|0 |1 is obsolete| | --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 52337 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52337&action=edit Bug 16500: [QA Follow-up] Catch warning if branch MPL already exists The current test had no warnings, when you have no MPL branch, and only catches the warn from the second build on line 57. If you do have MPL, a warning comes from line 56. This patch fixes it by removing MPL from the test. A new branch is created first and then we try to create it again. Test plan: Run the test. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for Koha 16.11, thanks Marcel! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |frederic@tamil.fr --- Comment #15 from Frédéric Demians <frederic@tamil.fr> --- Pushed in 16.05. Will be in 16.05.01. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16500 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |16155 CC| |julian.maurice@biblibre.com Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16155 [Bug 16155] Composite keys in TestBuilder and more -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org