https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23260
Lin Wei <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #173 from Lin Wei <[email protected]> --- # Test Results Unsure. I think the Test Plan mentions the wrong perl script to run: attachment 182007 shows a script different to the one mentionned in the Test Plan. Furthermore, the unit tests defined in `t/db_dependent/Koha/Patrons.t` currently fail in `main`. # Test Execution 1. Apply patch. 2. Set "AnonymousPatron" to "10101010." 3. Set "AnonymizeLastBorrower" and "AnonymizeLastBorrower" to "Anonymize" and "10". 3. Run `./misc/cronjobs/batch_anonymise.pl`. => Runs without asking for confirmation. 4. Run `./misc/cronjobs/anonymize_last_borrowers.pl`. => Asks for "--confirm" flag. 5. Run `./misc/cronjobs/anonymize_last_borrowers.pl --confirm`. => Runs. 6. Run `prove t/db_dependent/Koha/Patrons.t`. => Tests fail, see [Prove Output - Patch] below. 7. Reset via `git reset --hard origin/main; git pull`. 8. Run `prove t/db_dependent/Koha/Patrons.t`. => Tests fail, see [Prove Output - Main] below. # Conclusion - Test Plan is unclear: - Test Plan might contain typo. - Script that I think needs to be tested behaves as expected. - Attachment 182006 shows inconsequential change in code formatting (ok). - But 182005 adjusts unit tests that are difficult to verify because they also fail in `main`. - It seems that everything is likely behaving as expected but, due to the uncertainties mentionned above, I am leaving this patch as "Needs Signoff." # Prove Output - Patch prove t/db_dependent/Koha/Patrons.t t/db_dependent/Koha/Patrons.t .. 13/47 # Failed test 'Patron should have 2 overdues' # at t/db_dependent/Koha/Patrons.t line 862. # got: '3' # expected: '2' # Looks like you failed 1 test of 19. t/db_dependent/Koha/Patrons.t .. 16/47 # Failed test 'checkouts + pending_checkouts + overdues + old_checkouts' # at t/db_dependent/Koha/Patrons.t line 882. t/db_dependent/Koha/Patrons.t .. 46/47 # Failed test 'no warnings' # at /usr/local/share/perl/5.38.2/Test/Builder.pm line 187. # There were 3 warning(s) # Previous test 17 'The issue should be returned in the same order as they have been done, second is correct' # Use of uninitialized value $unit in string eq at /inlibro/git/koha-master-dev-linwei/C4/Overdues.pm line 352. # at /inlibro/git/koha-master-dev-linwei/C4/Overdues.pm line 352. # C4::Overdues::get_chargeable_units(undef, DateTime=HASH(0x59e5be8f57f8), DateTime=HASH(0x59e5be8d1b18), "zJnwJX") called at /inlibro/git/koha-master-dev-linwei/C4/Circulation.pm line 2830 # C4::Circulation::_calculate_new_debar_dt(Koha::Patron=HASH(0x59e5be7c50b0), Koha::Item=HASH(0x59e5be8bba30), DateTime=HASH(0x59e5be8f57f8), DateTime=HASH(0x59e5be8d1b18)) called at /inlibro/git/koha-master-dev-linwei/C4/Circulation.pm line 2893 # C4::Circulation::_debar_user_on_return(Koha::Patron=HASH(0x59e5be7c50b0), Koha::Item=HASH(0x59e5be8bba30), DateTime=HASH(0x59e5be8f57f8), DateTime=HASH(0x59e5be8d1b18)) called at /inlibro/git/koha-master-dev-linwei/C4/Circulation.pm line 2471 # C4::Circulation::AddReturn("F7WtNareKyJ_KO") called at t/db_dependent/Koha/Patrons.t line 873 # main::__ANON__() called at /usr/local/share/perl/5.38.2/Test/Builder.pm line 368 # eval {...} called at /usr/local/share/perl/5.38.2/Test/Builder.pm line 368 # Test::Builder::subtest(Test::Builder=HASH(0x59e5b3d98ff0), "checkouts + pending_checkouts + overdues + old_checkouts", CODE(0x59e5be47d6a8)) called at /usr/local/share/perl/5.38.2/Test/More.pm line 831 # Test::More::subtest("checkouts + pending_checkouts + overdues + old_checkouts", CODE(0x59e5be47d6a8)) called at t/db_dependent/Koha/Patrons.t line 882 # # ---------- # Previous test 17 'The issue should be returned in the same order as they have been done, second is correct' # Use of uninitialized value $unit in string eq at /inlibro/git/koha-master-dev-linwei/C4/Overdues.pm line 352. # at /inlibro/git/koha-master-dev-linwei/C4/Overdues.pm line 352. # C4::Overdues::get_chargeable_units(undef, DateTime=HASH(0x59e5be8bee00), DateTime=HASH(0x59e5be8dedf0), "zJnwJX") called at /inlibro/git/koha-master-dev-linwei/C4/Circulation.pm line 2830 # C4::Circulation::_calculate_new_debar_dt(Koha::Patron=HASH(0x59e5be8e6838), Koha::Item=HASH(0x59e5be8e6598), DateTime=HASH(0x59e5be8bee00), DateTime=HASH(0x59e5be8dedf0)) called at /inlibro/git/koha-master-dev-linwei/C4/Circulation.pm line 2893 # C4::Circulation::_debar_user_on_return(Koha::Patron=HASH(0x59e5be8e6838), Koha::Item=HASH(0x59e5be8e6598), DateTime=HASH(0x59e5be8bee00), DateTime=HASH(0x59e5be8dedf0)) called at /inlibro/git/koha-master-dev-linwei/C4/Circulation.pm line 2471 # C4::Circulation::AddReturn("DaXCuu4Lm6mqI") called at t/db_dependent/Koha/Patrons.t line 874 # main::__ANON__() called at /usr/local/share/perl/5.38.2/Test/Builder.pm line 368 # eval {...} called at /usr/local/share/perl/5.38.2/Test/Builder.pm line 368 # Test::Builder::subtest(Test::Builder=HASH(0x59e5b3d98ff0), "checkouts + pending_checkouts + overdues + old_checkouts", CODE(0x59e5be47d6a8)) called at /usr/local/share/perl/5.38.2/Test/More.pm line 831 # Test::More::subtest("checkouts + pending_checkouts + overdues + old_checkouts", CODE(0x59e5be47d6a8)) called at t/db_dependent/Koha/Patrons.t line 882 # # ---------- # Previous test 0 '' # Use of uninitialized value $unit in string eq at /inlibro/git/koha-master-dev-linwei/C4/Overdues.pm line 352. # at /inlibro/git/koha-master-dev-linwei/C4/Overdues.pm line 352. # C4::Overdues::get_chargeable_units(undef, DateTime=HASH(0x59e5be808390), DateTime=HASH(0x59e5be8f2fb8), "mxQDxyz8") called at /inlibro/git/koha-master-dev-linwei/C4/Circulation.pm line 2830 # C4::Circulation::_calculate_new_debar_dt(Koha::Patron=HASH(0x59e5be700268), Koha::Item=HASH(0x59e5be75cc50), DateTime=HASH(0x59e5be808390), DateTime=HASH(0x59e5be8f2fb8)) called at /inlibro/git/koha-master-dev-linwei/C4/Circulation.pm line 2893 # C4::Circulation::_debar_user_on_return(Koha::Patron=HASH(0x59e5be700268), Koha::Item=HASH(0x59e5be75cc50), DateTime=HASH(0x59e5be808390), DateTime=HASH(0x59e5be8f2fb8)) called at /inlibro/git/koha-master-dev-linwei/C4/Circulation.pm line 2471 # C4::Circulation::AddReturn("rgu6PRZrAlB", undef, undef, DateTime=HASH(0x59e5be8f2fb8)) called at t/db_dependent/Koha/Patrons.t line 1589 # main::__ANON__() called at /usr/local/share/perl/5.38.2/Test/Builder.pm line 368 # eval {...} called at /usr/local/share/perl/5.38.2/Test/Builder.pm line 368 # Test::Builder::subtest(Test::Builder=HASH(0x59e5b3d98ff0), "anonymize items_last_borrower by days", CODE(0x59e5be8f5660)) called at /usr/local/share/perl/5.38.2/Test/More.pm line 831 # Test::More::subtest("anonymize items_last_borrower by days", CODE(0x59e5be8f5660)) called at t/db_dependent/Koha/Patrons.t line 1612 # main::__ANON__() called at /usr/local/share/perl/5.38.2/Test/Builder.pm line 368 # eval {...} called at /usr/local/share/perl/5.38.2/Test/Builder.pm line 368 # Test::Builder::subtest(Test::Builder=HASH(0x59e5b3d98ff0), "anonymize items_last_borrower", CODE(0x59e5be47d6a8)) called at /usr/local/share/perl/5.38.2/Test/More.pm line 831 # Test::More::subtest("anonymize items_last_borrower", CODE(0x59e5be47d6a8)) called at t/db_dependent/Koha/Patrons.t line 1704 # # Looks like you failed 2 tests of 47. t/db_dependent/Koha/Patrons.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/47 subtests Test Summary Report ------------------- t/db_dependent/Koha/Patrons.t (Wstat: 512 (exited 2) Tests: 47 Failed: 2) Failed tests: 16, 47 Non-zero exit status: 2 Files=1, Tests=47, 27 wallclock secs ( 0.04 usr 0.01 sys + 18.53 cusr 2.86 csys = 21.44 CPU) Result: FAIL # Prove Output - Main prove t/db_dependent/Koha/Patrons.t t/db_dependent/Koha/Patrons.t .. 13/46 # Failed test 'Patron should have 2 overdues' # at t/db_dependent/Koha/Patrons.t line 862. # got: '3' # expected: '2' # Looks like you failed 1 test of 19. t/db_dependent/Koha/Patrons.t .. 16/46 # Failed test 'checkouts + pending_checkouts + overdues + old_checkouts' # at t/db_dependent/Koha/Patrons.t line 882. t/db_dependent/Koha/Patrons.t .. 44/46 # Failed test 'no warnings' # at /usr/local/share/perl/5.38.2/Test/Builder.pm line 187. # There were 2 warning(s) # Previous test 17 'The issue should be returned in the same order as they have been done, second is correct' # Use of uninitialized value $unit in string eq at /inlibro/git/koha-master-dev-linwei/C4/Overdues.pm line 352. # at /inlibro/git/koha-master-dev-linwei/C4/Overdues.pm line 352. # C4::Overdues::get_chargeable_units(undef, DateTime=HASH(0x5c5975d35c98), DateTime=HASH(0x5c5975d0eba0), "uNLwkz") called at /inlibro/git/koha-master-dev-linwei/C4/Circulation.pm line 2830 # C4::Circulation::_calculate_new_debar_dt(Koha::Patron=HASH(0x5c5975c01cb0), Koha::Item=HASH(0x5c5975c19cf0), DateTime=HASH(0x5c5975d35c98), DateTime=HASH(0x5c5975d0eba0)) called at /inlibro/git/koha-master-dev-linwei/C4/Circulation.pm line 2893 # C4::Circulation::_debar_user_on_return(Koha::Patron=HASH(0x5c5975c01cb0), Koha::Item=HASH(0x5c5975c19cf0), DateTime=HASH(0x5c5975d35c98), DateTime=HASH(0x5c5975d0eba0)) called at /inlibro/git/koha-master-dev-linwei/C4/Circulation.pm line 2471 # C4::Circulation::AddReturn("Z6bNQUnw8Q1_F") called at t/db_dependent/Koha/Patrons.t line 873 # main::__ANON__() called at /usr/local/share/perl/5.38.2/Test/Builder.pm line 368 # eval {...} called at /usr/local/share/perl/5.38.2/Test/Builder.pm line 368 # Test::Builder::subtest(Test::Builder=HASH(0x5c596b215960), "checkouts + pending_checkouts + overdues + old_checkouts", CODE(0x5c59758ad970)) called at /usr/local/share/perl/5.38.2/Test/More.pm line 831 # Test::More::subtest("checkouts + pending_checkouts + overdues + old_checkouts", CODE(0x5c59758ad970)) called at t/db_dependent/Koha/Patrons.t line 882 # # ---------- # Previous test 17 'The issue should be returned in the same order as they have been done, second is correct' # Use of uninitialized value $unit in string eq at /inlibro/git/koha-master-dev-linwei/C4/Overdues.pm line 352. # at /inlibro/git/koha-master-dev-linwei/C4/Overdues.pm line 352. # C4::Overdues::get_chargeable_units(undef, DateTime=HASH(0x5c5975d3be70), DateTime=HASH(0x5c5975d48620), "uNLwkz") called at /inlibro/git/koha-master-dev-linwei/C4/Circulation.pm line 2830 # C4::Circulation::_calculate_new_debar_dt(Koha::Patron=HASH(0x5c5975c7f748), Koha::Item=HASH(0x5c5975c23998), DateTime=HASH(0x5c5975d3be70), DateTime=HASH(0x5c5975d48620)) called at /inlibro/git/koha-master-dev-linwei/C4/Circulation.pm line 2893 # C4::Circulation::_debar_user_on_return(Koha::Patron=HASH(0x5c5975c7f748), Koha::Item=HASH(0x5c5975c23998), DateTime=HASH(0x5c5975d3be70), DateTime=HASH(0x5c5975d48620)) called at /inlibro/git/koha-master-dev-linwei/C4/Circulation.pm line 2471 # C4::Circulation::AddReturn("oVFGo_tqof9jA7HGAgH1") called at t/db_dependent/Koha/Patrons.t line 874 # main::__ANON__() called at /usr/local/share/perl/5.38.2/Test/Builder.pm line 368 # eval {...} called at /usr/local/share/perl/5.38.2/Test/Builder.pm line 368 # Test::Builder::subtest(Test::Builder=HASH(0x5c596b215960), "checkouts + pending_checkouts + overdues + old_checkouts", CODE(0x5c59758ad970)) called at /usr/local/share/perl/5.38.2/Test/More.pm line 831 # Test::More::subtest("checkouts + pending_checkouts + overdues + old_checkouts", CODE(0x5c59758ad970)) called at t/db_dependent/Koha/Patrons.t line 882 # # Looks like you failed 2 tests of 46. t/db_dependent/Koha/Patrons.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/46 subtests Test Summary Report ------------------- t/db_dependent/Koha/Patrons.t (Wstat: 512 (exited 2) Tests: 46 Failed: 2) Failed tests: 16, 46 Non-zero exit status: 2 Files=1, Tests=46, 24 wallclock secs ( 0.05 usr 0.00 sys + 16.98 cusr 2.70 csys = 19.73 CPU) Result: FAIL -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
