13:51:29 koha_1 | Missing mandatory extended attribute (type=Bg9cq3e) at /kohadevbox/koha/Koha/Patrons/Import.pm line 352, <$fh> line 2. 13:51:29 koha_1 | 13:51:29 koha_1 | # Failed test at t/db_dependent/Koha/Patrons/Import.t line 1108. 13:51:29 koha_1 | # got: '0' 13:51:29 koha_1 | # expected: '1' 13:51:29 koha_1 | 13:51:29 koha_1 | # Failed test at t/db_dependent/Koha/Patrons/Import.t line 1135. 13:51:29 koha_1 | # Structures begin differing at: 13:51:29 koha_1 | # $got->[0] = Does not exist 13:51:29 koha_1 | # $expected->[0] = HASH(0x5637834005a8) 13:51:29 koha_1 | # Looks like you failed 2 tests of 19. 13:51:29 koha_1 | 13:51:29 koha_1 | # Failed test 'update existing patron' 13:51:29 koha_1 | # at t/db_dependent/Koha/Patrons/Import.t line 1112. 13:51:29 koha_1 | # Looks like you failed 1 test of 17. 13:51:29 koha_1 | 13:51:29 koha_1 | # Failed test 'patron_attributes' 13:51:29 koha_1 | # at t/db_dependent/Koha/Patrons/Import.t line 1114. Master_D11 run 315 on Docker_7
Previously reported on bug 27858: Master_D9 run 1663 11:41:11 koha_1 | [0m[92mKoha::Exceptions::Patron::MissingMandatoryExtendedAttribute[0m { 11:41:11 koha_1 | Parents [92mKoha::Exceptions::Patron[0m 11:41:11 koha_1 | public methods (3) : [92mdescription[0m, [92mFields[0m, [92mtype[0m 11:41:11 koha_1 | private methods (0) 11:41:11 koha_1 | internals: { 11:41:11 koha_1 | [35megid[0m "[93m1000 1000[0m", 11:46:27 koha_1 | [35meuid[0m [94m1001[0m, 11:46:27 koha_1 | [35mgid[0m "[93m1000 1000[0m", 11:46:27 koha_1 | [35mmessage[0m "[93m[0m", 11:46:27 koha_1 | [35mpid[0m [94m4522[0m, 11:46:27 koha_1 | [35mtime[0m [94m1621935671[0m, 11:46:27 koha_1 | [35mtrace[0m [92mDevel::StackTrace[0m, 11:46:27 koha_1 | [35mtype[0m "[93mVfu0SZ[0m", 11:46:27 koha_1 | [35muid[0m [94m1001[0m 11:46:27 koha_1 | } 11:46:27 koha_1 | } 11:46:27 koha_1 | Missing mandatory extended attribute (type=Vfu0SZ) at /kohadevbox/koha/Koha/Patrons/Import.pm line 420, <$fh> line 2. 11:46:27 koha_1 | 11:46:27 koha_1 | # Failed test at t/db_dependent/Koha/Patrons/Import.t line 902. 11:46:27 koha_1 | # got: '0' 11:46:27 koha_1 | # expected: '1' 11:46:27 koha_1 | # Looks like you planned 17 tests but ran 1. 11:46:27 koha_1 | # Looks like you failed 1 test of 1 run. 11:46:27 koha_1 | 11:46:27 koha_1 | # Failed test 'patron_attributes' 11:46:27 koha_1 | # at t/db_dependent/Koha/Patrons/Import.t line 1114. 11:46:27 koha_1 | Can't call method "extended_attributes" on an undefined value at t/db_dependent/Koha/Patrons/Import.t line 905, <$fh> line 2. ----- Got it locally t/db_dependent/Koha/Patrons.t ........................................... 28/42 # No tests run! # Failed test 'No tests run for subtest "extended attributes"' # at t/db_dependent/Koha/Patrons.t line 1770. # Looks like you failed 1 test of 110. t/db_dependent/Koha/Patrons.t ........................................... 33/42 # Failed test 'Test Koha::Patrons::merge' # at t/db_dependent/Koha/Patrons.t line 1774. Missing mandatory extended attribute (type=hGA0QWrb6)# Looks like your test exited with 2 just after 33. ----- Master_D9_My8 586 Docker_7
Created attachment 121631 [details] [review] Bug 28516: Prevent failures if borrower_attribute_types.mandatory=1 TestBuilder will generate an integer for the Koha::Patron::Attribute::Type object, but if 1 is picked some tests are failing randomly At least t/db_dependent/Koha/Patrons.t and t/db_dependent/Koha/Patrons/Import.t The expection "Missing mandatory extended attribute" is raised when the patron is stored. Test plan: The following script should return 0 when the patch is applied: """ use t::lib::TestBuilder; my $builder = t::lib::TestBuilder->new; my $x = $builder->build_object( { class => 'Koha::Patron::Attribute::Types', } ); say $x->mandatory; """
Koha_Master_D9/1684
Will also fix 13:40:55 koha_1 | # Failed test 'No tests run for subtest "extended attributes"' 13:40:55 koha_1 | # at t/db_dependent/Koha/Patrons.t line 1770. 13:40:55 koha_1 | # Looks like you failed 1 test of 110. 13:40:55 koha_1 | 13:40:55 koha_1 | # Failed test 'Test Koha::Patrons::merge' 13:40:55 koha_1 | # at t/db_dependent/Koha/Patrons.t line 1774. 13:40:55 koha_1 | Missing mandatory extended attribute (type=cX9Fk5KL)# Looks like your test exited with 11 just after 33.
Created attachment 122283 [details] [review] Bug 28516: Prevent failures if borrower_attribute_types.mandatory=1 TestBuilder will generate an integer for the Koha::Patron::Attribute::Type object, but if 1 is picked some tests are failing randomly At least t/db_dependent/Koha/Patrons.t and t/db_dependent/Koha/Patrons/Import.t The expection "Missing mandatory extended attribute" is raised when the patron is stored. Test plan: The following script should return 0 when the patch is applied: """ use t::lib::TestBuilder; my $builder = t::lib::TestBuilder->new; my $x = $builder->build_object( { class => 'Koha::Patron::Attribute::Types', } ); say $x->mandatory; """ Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed to master for 21.11, thanks to everybody involved!
I see it is in 21.05.x
Pushed to 20.11.x for 20.11.09
Missing dependencies for 20.05.x, it shouldn't be affected, no backport.