[Bug 14097] New: Add unit tests to C4::UsageStats
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Bug ID: 14097 Summary: Add unit tests to C4::UsageStats Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: trivial Priority: P5 - low Component: Test Suite Assignee: julian.fiol@biblibre.com Reporter: julian.fiol@biblibre.com QA Contact: gmcharlt@gmail.com DESCRIPTION ----------- Add unit tests to C4::UsageStats Subroutine : (V : tested, X : Not tested) V NeedUpdate V BuiltReport X ReportToCommunity V _count TEST PLAN --------- 1. Apply patch 2. prove -v t/db_dependent/UsageStats.t -- All tests should run successfully /!\ I have 1 warning but I don't know where it can come /!\ (in cleanup) DBIx::Class::Storage::txn_rollback(): A txn_rollback in nested transaction is ineffective! (depth 1) at t/lib/TestBuilder.pm line 308 TEST PLAN OPTIONAL ------------------ Go check bug 13899 to see the coverage of this module. Coverage BEFORE this patch : Statement : 40,5% Branch : 0,0% Condition : 0,0% Subroutine : 55,6% Coverage AFTER this patch : Statement : 81,0% Branch : 100,0% Condition : 100,0% Subroutine : 88,8% -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Julian FIOL <julian.fiol@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 --- Comment #1 from Julian FIOL <julian.fiol@biblibre.com> --- Created attachment 38719 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38719&action=edit Bug 14097 : Testing C4::UsageStats DESCRIPTION ----------- Add unit tests to C4::UsageStats Subroutine : (V : tested, X : Not tested) V NeedUpdate V BuiltReport X ReportToCommunity V _count TEST PLAN --------- 1. Apply patch 2. prove -v t/db_dependent/UsageStats.t -- All tests should run successfully /!\ I have 1 warning but I don't know where it can come /!\ (in cleanup) DBIx::Class::Storage::txn_rollback(): A txn_rollback in nested transaction is ineffective! (depth 1) at t/lib/TestBuilder.pm line 308 TEST PLAN OPTIONAL ------------------ Go check bug 13899 to see the coverage of this module. Coverage BEFORE this patch : Statement : 40,5% Branch : 0,0% Condition : 0,0% Subroutine : 55,6% Coverage AFTER this patch : Statement : 81,0% Branch : 100,0% Condition : 100,0% Subroutine : 88,8% -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #2 from Marc Véron <veron@veron.ch> --- Got following error: t/db_dependent/UsageStats.t .. 1/552 DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_kohadev`.`issues`, CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON UPDATE CASCADE) at t/db_dependent/UsageStats.t line 45. DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_kohadev`.`issues`, CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON UPDATE CASCADE) at t/db_dependent/UsageStats.t line 45. # Looks like you planned 552 tests but ran 9. # Looks like your test exited with 255 just after 9. t/db_dependent/UsageStats.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 543/552 subtests After that, my DB seems to be broken, can not langer search, get: No results found You did not specify any search criteria. Error: Can't call method "raw" on an undefined value at /usr/share/kohaclone/C4/Search.pm line 799. Not sure what happend. Will have to restore my VM from yesterday's backup. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 --- Comment #3 from Marc Véron <veron@veron.ch> --- Ok, restored VM, tested with same failure as above. No problem with database after testing. Do not now what happend to break it before. Question: What happens if the script stops / exits / fails for whatever reason after following lines? my $dbh = C4::Context->dbh; $dbh->{AutoCommit} = 0; $dbh->{RaiseError} = 1; $dbh->do('DELETE FROM biblio'); $dbh->do('DELETE FROM items'); $dbh->do('DELETE FROM auth_header'); $dbh->do('DELETE FROM old_issues'); $dbh->do('DELETE FROM old_reserves'); $dbh->do('DELETE FROM borrowers'); $dbh->do('DELETE FROM aqorders'); $dbh->do('DELETE FROM subscription'); -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 --- Comment #4 from Julian FIOL <julian.fiol@biblibre.com> --- Created attachment 38800 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38800&action=edit Bug 14097 : Delete table issues before testing If we delete all biblio DB, we could have some troubles with foreign keys -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 --- Comment #5 from Julian FIOL <julian.fiol@biblibre.com> --- About Comment #3 After some tests, it seems that if the script stops / exits / fails for whatever reason after following lines, there is no $dbh->rollback, and the changes of the DB remains... my $dbh = C4::Context->dbh; $dbh->{AutoCommit} = 0; $dbh->{RaiseError} = 1; $dbh->do('DELETE FROM biblio'); $dbh->do('DELETE FROM items'); $dbh->do('DELETE FROM auth_header'); $dbh->do('DELETE FROM old_issues'); $dbh->do('DELETE FROM old_reserves'); $dbh->do('DELETE FROM borrowers'); $dbh->do('DELETE FROM aqorders'); $dbh->do('DELETE FROM subscription'); -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 --- Comment #6 from Julian FIOL <julian.fiol@biblibre.com> --- Created attachment 38814 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38814&action=edit Bug 14097 : changing verif_systempreferences_values subroutine It's saving a large number of lines -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38719|0 |1 is obsolete| | --- Comment #7 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 38946 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38946&action=edit [SIGNED-OFF] Bug 14097: Testing C4::UsageStats DESCRIPTION ----------- Add unit tests to C4::UsageStats Subroutine : (V : tested, X : Not tested) V NeedUpdate V BuiltReport X ReportToCommunity V _count TEST PLAN --------- 1. Apply patch 2. prove -v t/db_dependent/UsageStats.t -- All tests should run successfully /!\ I have 1 warning but I don't know where it can come /!\ (in cleanup) DBIx::Class::Storage::txn_rollback(): A txn_rollback in nested transaction is ineffective! (depth 1) at t/lib/TestBuilder.pm line 308 TEST PLAN OPTIONAL ------------------ Go check bug 13899 to see the coverage of this module. Coverage BEFORE this patch : Statement : 40,5% Branch : 0,0% Condition : 0,0% Subroutine : 55,6% Coverage AFTER this patch : Statement : 81,0% Branch : 100,0% Condition : 100,0% Subroutine : 88,8% Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38800|0 |1 is obsolete| | --- Comment #8 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 38947 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38947&action=edit [SIGNED-OFF] Bug 14097: Delete table issues before testing If we delete all biblio DB, we could have some troubles with foreign keys Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38814|0 |1 is obsolete| | --- Comment #9 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 38948 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38948&action=edit [SIGNED-OFF] Bug 14097: changing verif_systempreferences_values subroutine It's saving a large number of lines Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> All tests run, no koha-qa errors -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |bgkriegel@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #10 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Mmmm, changed my mind. After running the test, my db was left without items, borrowers, etc. No rollback it seems -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Julian FIOL <julian.fiol@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 --- Comment #11 from Julian FIOL <julian.fiol@biblibre.com> --- Created attachment 39080 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39080&action=edit Bug 14097 : Rollback issue and warning corrected The rollback issue came from '_count' testing. It used a 'DROP TABLE' and 'CREATE TABLE' which implicitly do autocommit. That's why the final rollback could not be. This patch no longer uses t::lib::TestBuilder either because it was the cause of the warning on Comment #1 : "DBIx::Class::Storage::txn_rollback(): A txn_rollback in nested transaction is ineffective! (depth 1) at t/lib/TestBuilder.pm line 308" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39080|0 |1 is obsolete| | --- Comment #12 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 39085 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39085&action=edit [SIGNED-OFF] Bug 14097: Rollback issue and warning corrected The rollback issue came from '_count' testing. It used a 'DROP TABLE' and 'CREATE TABLE' which implicitly do autocommit. That's why the final rollback could not be. This patch no longer uses t::lib::TestBuilder either because it was the cause of the warning on Comment #1 : "DBIx::Class::Storage::txn_rollback(): A txn_rollback in nested transaction is ineffective! (depth 1) at t/lib/TestBuilder.pm line 308" Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Now data is preserved, no errors. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |kyle@bywatersolutions.com --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- FAIL t/db_dependent/UsageStats.t OK critic OK forbidden patterns OK pod FAIL valid Type of arg 1 to keys must be hash (not hash element) t/db_dependent/UsageStats.t had compilation errors. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 --- Comment #14 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- (In reply to Kyle M Hall from comment #13)
FAIL t/db_dependent/UsageStats.t OK critic OK forbidden patterns OK pod FAIL valid Type of arg 1 to keys must be hash (not hash element) t/db_dependent/UsageStats.t had compilation errors.
Strange qa -c 4 testing 4 commit(s) (applied to 48d793a 'Bug 14106: patch existing zebra confi') Processing files before patches |========================>| 2 / 2 (100.00%) Processing files after patches |========================>| 2 / 2 (100.00%) OK t/db_dependent/UsageStats.t OK C4/UsageStats.pm And t & xt tests run ok. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #15 from M. Tompsett <mtompset@hotmail.com> --- Running on Debian Jessie: [SNIP] keys on reference is experimental at t/db_dependent/UsageStats.t line 88. keys on reference is experimental at t/db_dependent/UsageStats.t line 106. keys on reference is experimental at t/db_dependent/UsageStats.t line 119. keys on reference is experimental at t/db_dependent/UsageStats.t line 136. keys on reference is experimental at t/db_dependent/UsageStats.t line 153. keys on reference is experimental at t/db_dependent/UsageStats.t line 162. keys on reference is experimental at t/db_dependent/UsageStats.t line 587. [SNIP] Please clean up. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 --- Comment #16 from M. Tompsett <mtompset@hotmail.com> --- Similar to comment #13: mtompset@debian:~/kohaclone$ koha-qa.pl -v 2 -c 3 testing 3 commit(s) (applied to b61e957 'Bug 14097: Testing C4::UsageStats') Processing files before patches |========================>| 1 / 1 (100.00%) Processing files after patches |========================>| 1 / 1 (100.00%) FAIL t/db_dependent/UsageStats.t OK critic OK forbidden patterns OK pod FAIL valid keys on reference is experimental See line numbers in comment #15. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 --- Comment #17 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 39435 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39435&action=edit Bug 14097 - Correct noise under Debian The first four patches do not create any noise under Ubuntu 14.04 LTS. Running on Debian Jessie: [SNIP] keys on reference is experimental at t/db_dependent/UsageStats.t line 88. keys on reference is experimental at t/db_dependent/UsageStats.t line 106. keys on reference is experimental at t/db_dependent/UsageStats.t line 119. keys on reference is experimental at t/db_dependent/UsageStats.t line 136. keys on reference is experimental at t/db_dependent/UsageStats.t line 153. keys on reference is experimental at t/db_dependent/UsageStats.t line 162. keys on reference is experimental at t/db_dependent/UsageStats.t line 587. [SNIP] Instead of having 'keys $foo->{bar}', 'keys %{$foo->{bar}}' was used. TEST PLAN --------- 1) On a DEBIAN system (Jessie gives above messages) apply the first 4 patches interactively. 2) $ prove t/db_dependent/UsageStats.t -- trigger noise like above. 3) apply this patch 4) $ prove t/db_dependent/UsageStats.t -- no noise triggered. 5) koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 --- Comment #18 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Thanks Mark, I need some box with Perl 5.20 :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14526 --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Be care, AddReserve prototype changed by bug 14526 (contrainst param removed). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|http://bugs.koha-community. |http://bugs.koha-community. |org/bugzilla3/show_bug.cgi? |org/bugzilla3/show_bug.cgi? |id=14526 |id=9809 --- Comment #20 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I meant bug 9809. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Kyle M Hall <kyle.m.hall@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|kyle@bywatersolutions.com |kyle.m.hall@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 --- Comment #21 from Julian FIOL <julian.fiol@biblibre.com> --- Created attachment 41837 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41837&action=edit Bug 14097 : Rollback issue and warning corrected The rollback issue came from '_count' testing. It used a 'DROP TABLE' and 'CREATE TABLE' which implicitly do autocommit. That's why the final rollback could not be. This patch no longer uses t::lib::TestBuilder either because it was the cause of the warning on Comment #1 : "DBIx::Class::Storage::txn_rollback(): A txn_rollback in nested transaction is ineffective! (depth 1) at t/lib/TestBuilder.pm line 308" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Julian FIOL <julian.fiol@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41837|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 --- Comment #22 from Julian FIOL <julian.fiol@biblibre.com> --- Created attachment 41843 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41843&action=edit Bug 14097 : Avoid issue if the number of syspref shared is modified -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 --- Comment #23 from Julian FIOL <julian.fiol@biblibre.com> --- Created attachment 41844 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41844&action=edit Bug 14097 : Changing AddReserve prototype call In response of Joubu comment #19 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Medium patch CC| |z.tajoli@cineca.it -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|z.tajoli@cineca.it | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|julian.fiol@biblibre.com |julian.maurice@biblibre.com CC| |julian.maurice@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 --- Comment #24 from Marc Véron <veron@veron.ch> --- Does not apply: CONFLICT (content): Merge conflict in t/db_dependent/UsageStats.t Failed to merge in the changes. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38946|0 |1 is obsolete| | --- Comment #25 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 46200 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46200&action=edit Bug 14097: Testing C4::UsageStats DESCRIPTION ----------- Add unit tests to C4::UsageStats Subroutine : (V : tested, X : Not tested) V NeedUpdate V BuiltReport X ReportToCommunity V _count TEST PLAN --------- 1. Apply patch 2. prove -v t/db_dependent/UsageStats.t -- All tests should run successfully /!\ I have 1 warning but I don't know where it can come /!\ (in cleanup) DBIx::Class::Storage::txn_rollback(): A txn_rollback in nested transaction is ineffective! (depth 1) at t/lib/TestBuilder.pm line 308 TEST PLAN OPTIONAL ------------------ Go check bug 13899 to see the coverage of this module. Coverage BEFORE this patch : Statement : 40,5% Branch : 0,0% Condition : 0,0% Subroutine : 55,6% Coverage AFTER this patch : Statement : 81,0% Branch : 100,0% Condition : 100,0% Subroutine : 88,8% Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38947|0 |1 is obsolete| | --- Comment #26 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 46201 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46201&action=edit Bug 14097: Delete table issues before testing If we delete all biblio DB, we could have some troubles with foreign keys Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38948|0 |1 is obsolete| | --- Comment #27 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 46202 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46202&action=edit Bug 14097: changing verif_systempreferences_values subroutine It's saving a large number of lines Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> All tests run, no koha-qa errors -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39085|0 |1 is obsolete| | --- Comment #28 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 46203 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46203&action=edit Bug 14097: Rollback issue and warning corrected The rollback issue came from '_count' testing. It used a 'DROP TABLE' and 'CREATE TABLE' which implicitly do autocommit. That's why the final rollback could not be. This patch no longer uses t::lib::TestBuilder either because it was the cause of the warning on Comment #1 : "DBIx::Class::Storage::txn_rollback(): A txn_rollback in nested transaction is ineffective! (depth 1) at t/lib/TestBuilder.pm line 308" Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Now data is preserved, no errors. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39435|0 |1 is obsolete| | --- Comment #29 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 46204 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46204&action=edit Bug 14097 - Correct noise under Debian The first four patches do not create any noise under Ubuntu 14.04 LTS. Running on Debian Jessie: [SNIP] keys on reference is experimental at t/db_dependent/UsageStats.t line 88. keys on reference is experimental at t/db_dependent/UsageStats.t line 106. keys on reference is experimental at t/db_dependent/UsageStats.t line 119. keys on reference is experimental at t/db_dependent/UsageStats.t line 136. keys on reference is experimental at t/db_dependent/UsageStats.t line 153. keys on reference is experimental at t/db_dependent/UsageStats.t line 162. keys on reference is experimental at t/db_dependent/UsageStats.t line 587. [SNIP] Instead of having 'keys $foo->{bar}', 'keys %{$foo->{bar}}' was used. TEST PLAN --------- 1) On a DEBIAN system (Jessie gives above messages) apply the first 4 patches interactively. 2) $ prove t/db_dependent/UsageStats.t -- trigger noise like above. 3) apply this patch 4) $ prove t/db_dependent/UsageStats.t -- no noise triggered. 5) koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41843|0 |1 is obsolete| | --- Comment #30 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 46205 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46205&action=edit Bug 14097 : Avoid issue if the number of syspref shared is modified -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #41844|0 |1 is obsolete| | --- Comment #31 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 46206 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46206&action=edit Bug 14097 : Changing AddReserve prototype call In response of Joubu comment #19 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 --- Comment #32 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 46207 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46207&action=edit Bug 14097: Fixed missing test cases Fixed AllowPkiAuth issue caused by 15101. Added missing AudioAlerts TEST PLAN --------- 1) prove -v t/db_dependent/UsageStats.t -- should pass after applying patch 2) Run koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46200|0 |1 is obsolete| | --- Comment #33 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 46208 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46208&action=edit Bug 14097: Testing C4::UsageStats DESCRIPTION ----------- Add unit tests to C4::UsageStats Subroutine : (V : tested, X : Not tested) V NeedUpdate V BuiltReport X ReportToCommunity V _count TEST PLAN --------- 1. Apply patch 2. prove -v t/db_dependent/UsageStats.t -- All tests should run successfully /!\ I have 1 warning but I don't know where it can come /!\ (in cleanup) DBIx::Class::Storage::txn_rollback(): A txn_rollback in nested transaction is ineffective! (depth 1) at t/lib/TestBuilder.pm line 308 TEST PLAN OPTIONAL ------------------ Go check bug 13899 to see the coverage of this module. Coverage BEFORE this patch : Statement : 40,5% Branch : 0,0% Condition : 0,0% Subroutine : 55,6% Coverage AFTER this patch : Statement : 81,0% Branch : 100,0% Condition : 100,0% Subroutine : 88,8% Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46201|0 |1 is obsolete| | --- Comment #34 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 46209 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46209&action=edit Bug 14097: Delete table issues before testing If we delete all biblio DB, we could have some troubles with foreign keys Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46202|0 |1 is obsolete| | --- Comment #35 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 46210 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46210&action=edit Bug 14097: changing verif_systempreferences_values subroutine It's saving a large number of lines Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> All tests run, no koha-qa errors -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46203|0 |1 is obsolete| | --- Comment #36 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 46211 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46211&action=edit Bug 14097: Rollback issue and warning corrected The rollback issue came from '_count' testing. It used a 'DROP TABLE' and 'CREATE TABLE' which implicitly do autocommit. That's why the final rollback could not be. This patch no longer uses t::lib::TestBuilder either because it was the cause of the warning on Comment #1 : "DBIx::Class::Storage::txn_rollback(): A txn_rollback in nested transaction is ineffective! (depth 1) at t/lib/TestBuilder.pm line 308" Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Now data is preserved, no errors. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46204|0 |1 is obsolete| | --- Comment #37 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 46212 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46212&action=edit Bug 14097 - Correct noise under Debian The first four patches do not create any noise under Ubuntu 14.04 LTS. Running on Debian Jessie: [SNIP] keys on reference is experimental at t/db_dependent/UsageStats.t line 88. keys on reference is experimental at t/db_dependent/UsageStats.t line 106. keys on reference is experimental at t/db_dependent/UsageStats.t line 119. keys on reference is experimental at t/db_dependent/UsageStats.t line 136. keys on reference is experimental at t/db_dependent/UsageStats.t line 153. keys on reference is experimental at t/db_dependent/UsageStats.t line 162. keys on reference is experimental at t/db_dependent/UsageStats.t line 587. [SNIP] Instead of having 'keys $foo->{bar}', 'keys %{$foo->{bar}}' was used. TEST PLAN --------- 1) On a DEBIAN system (Jessie gives above messages) apply the first 4 patches interactively. 2) $ prove t/db_dependent/UsageStats.t -- trigger noise like above. 3) apply this patch 4) $ prove t/db_dependent/UsageStats.t -- no noise triggered. 5) koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46205|0 |1 is obsolete| | --- Comment #38 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 46213 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46213&action=edit Bug 14097 : Avoid issue if the number of syspref shared is modified -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46206|0 |1 is obsolete| | --- Comment #39 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 46214 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46214&action=edit Bug 14097 : Changing AddReserve prototype call In response of Joubu comment #19 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14097 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46207|0 |1 is obsolete| | --- Comment #40 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 46215 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46215&action=edit Bug 14097: Fixed missing test cases Fixed AllowPkiAuth issue caused by 15101. Added missing AudioAlerts TEST PLAN --------- 1) prove -v t/db_dependent/UsageStats.t -- should pass after applying patch 2) Run koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org