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%
Created attachment 38719 [details] [review] 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%
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.
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');
Created attachment 38800 [details] [review] Bug 14097 : Delete table issues before testing If we delete all biblio DB, we could have some troubles with foreign keys
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');
Created attachment 38814 [details] [review] Bug 14097 : changing verif_systempreferences_values subroutine It's saving a large number of lines
Created attachment 38946 [details] [review] [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>
Created attachment 38947 [details] [review] [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>
Created attachment 38948 [details] [review] [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
Mmmm, changed my mind. After running the test, my db was left without items, borrowers, etc. No rollback it seems
Created attachment 39080 [details] [review] 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"
Created attachment 39085 [details] [review] [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.
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.
(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.
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.
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.
Created attachment 39435 [details] [review] 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
Thanks Mark, I need some box with Perl 5.20 :)
Be care, AddReserve prototype changed by bug 14526 (contrainst param removed).
I meant bug 9809.
Created attachment 41837 [details] [review] 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"
Created attachment 41843 [details] [review] Bug 14097 : Avoid issue if the number of syspref shared is modified
Created attachment 41844 [details] [review] Bug 14097 : Changing AddReserve prototype call In response of Joubu comment #19
Does not apply: CONFLICT (content): Merge conflict in t/db_dependent/UsageStats.t Failed to merge in the changes.
Created attachment 46200 [details] [review] 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>
Created attachment 46201 [details] [review] 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>
Created attachment 46202 [details] [review] 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
Created attachment 46203 [details] [review] 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.
Created attachment 46204 [details] [review] 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
Created attachment 46205 [details] [review] Bug 14097 : Avoid issue if the number of syspref shared is modified
Created attachment 46206 [details] [review] Bug 14097 : Changing AddReserve prototype call In response of Joubu comment #19
Created attachment 46207 [details] [review] 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
Created attachment 46208 [details] [review] 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>
Created attachment 46209 [details] [review] 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>
Created attachment 46210 [details] [review] 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
Created attachment 46211 [details] [review] 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.
Created attachment 46212 [details] [review] 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
Created attachment 46213 [details] [review] Bug 14097 : Avoid issue if the number of syspref shared is modified
Created attachment 46214 [details] [review] Bug 14097 : Changing AddReserve prototype call In response of Joubu comment #19
Created attachment 46215 [details] [review] 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
Created attachment 47717 [details] [review] 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 Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Created attachment 47719 [details] [review] 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 Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Created attachment 47720 [details] [review] Bug 14097 : Avoid issue if the number of syspref shared is modified Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Created attachment 47721 [details] [review] Bug 14097 : Changing AddReserve prototype call In response of Joubu comment #19 Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Created attachment 47722 [details] [review] 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 Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Created attachment 47723 [details] [review] Bug 14097 : Avoid issue if the number of syspref shared is modified Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Created attachment 47724 [details] [review] 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 Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Created attachment 47725 [details] [review] Bug 14097 : Avoid issue if the number of syspref shared is modified Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Created attachment 47726 [details] [review] Bug 14097 : Changing AddReserve prototype call In response of Joubu comment #19 Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Created attachment 47727 [details] [review] 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 Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Created attachment 47798 [details] [review] 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> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 47799 [details] [review] 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> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 47800 [details] [review] 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 Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 47801 [details] [review] 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. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 47802 [details] [review] 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 Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 47803 [details] [review] Bug 14097 : Avoid issue if the number of syspref shared is modified Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 47804 [details] [review] Bug 14097 : Changing AddReserve prototype call In response of Joubu comment #19 Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 47805 [details] [review] 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 Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to Master - Thanks! Should be in the May 2016 Release. Thanks!
Patch pushed to 3.22.x, will be in 3.22.5