[Bug 20169] New: Two tests are failing with DBD::mysql 4.041
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20169 Bug ID: 20169 Summary: Two tests are failing with DBD::mysql 4.041 Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: julian.maurice@biblibre.com QA Contact: testopia@bugs.koha-community.org Two tests are failing with DBD::mysql 4.041 prove t/db_dependent/Accounts.t t/db_dependent/Bookseller.t t/db_dependent/Accounts.t .... 17/23 # Failed test 'Correct amount logged to statistics' # at t/db_dependent/Accounts.t line 398. # got: '100' # expected: '100.0000' # Looks like you failed 1 test of 8. t/db_dependent/Accounts.t .... 20/23 # Failed test 'More Koha::Account::pay tests' # at t/db_dependent/Accounts.t line 400. # Failed test 'Correct amount logged to statistics' # at t/db_dependent/Accounts.t line 452. # got: '60' # expected: '60.0000' # Looks like you failed 1 test of 8. t/db_dependent/Accounts.t .... 21/23 # Failed test 'Even more Koha::Account::pay tests' # at t/db_dependent/Accounts.t line 454. t/db_dependent/Accounts.t .... 23/23 # Looks like you failed 2 tests of 23. t/db_dependent/Accounts.t .... Dubious, test returned 2 (wstat 512, 0x200) Failed 2/23 subtests t/db_dependent/Bookseller.t .. 2/86 # Failed test 'Koha::Acquisition::Booksellers->search returns the right informations about supplier Name2' # at t/db_dependent/Bookseller.t line 120. # Structures begin differing at: # $got->{discount} = '2' # $expected->{discount} = '2.0000' # Failed test 'Returns right fields of Supplier1 and Supplier2' # at t/db_dependent/Bookseller.t line 133. # Structures begin differing at: # $got->[0]{discount} = '2' # $expected->[0]{discount} = '2.0000' # Failed test 'Get Supplier1 (find a bookseller by id)' # at t/db_dependent/Bookseller.t line 152. # Structures begin differing at: # $got->{discount} = '1' # $expected->{discount} = '1.0000' # Looks like you failed 3 tests of 86. t/db_dependent/Bookseller.t .. Dubious, test returned 3 (wstat 768, 0x300) Failed 3/86 subtests Test Summary Report ------------------- t/db_dependent/Accounts.t (Wstat: 512 Tests: 23 Failed: 2) Failed tests: 20-21 Non-zero exit status: 2 t/db_dependent/Bookseller.t (Wstat: 768 Tests: 86 Failed: 3) Failed tests: 9, 11, 15 Non-zero exit status: 3 Files=2, Tests=109, 12 wallclock secs ( 0.05 usr 0.01 sys + 4.63 cusr 0.75 csys = 5.44 CPU) Result: FAIL Tests pass with DBD::mysql 4.028 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20169 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 71388 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71388&action=edit Bug 20169: Fix two tests when DBD::mysql is 4.041 Tests pass with DBD::mysql 4.028, but not with 4.041. I'm not sure which exact version makes those tests to fail. The problem is that with newer versions of DBD::mysql, 'float' columns get converted to numbers instead of string, thus the comparison fail. This patch converts the expected values to numbers so the comparison should succeed with both versions of DBD::mysql Test plan: 1. Install DBD::mysql 4.041 or newer 2. prove t/db_dependent/Accounts.t t/db_dependent/Bookseller.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20169 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |julian.maurice@biblibre.com Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20169 M. Tompsett <mtompset@hotmail.com> 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=20169 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #71388|0 |1 is obsolete| | --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 71595 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71595&action=edit Bug 20169: Fix two tests when DBD::mysql is 4.041 Tests pass with DBD::mysql 4.028, but not with 4.041. I'm not sure which exact version makes those tests to fail. The problem is that with newer versions of DBD::mysql, 'float' columns get converted to numbers instead of string, thus the comparison fail. This patch converts the expected values to numbers so the comparison should succeed with both versions of DBD::mysql Test plan: 1. Install DBD::mysql 4.041 or newer 2. prove t/db_dependent/Accounts.t t/db_dependent/Bookseller.t Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20169 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- So does this raise the required version? Updated tests fail for DBD::mysql 4.028 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20169 --- Comment #4 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Nick Clemens from comment #3)
So does this raise the required version? Updated tests fail for DBD::mysql 4.028
No tests should pass with 4.028 too. What is the output of tests ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20169 --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- not ok 9 - Koha::Acquisition::Booksellers->search returns the right informations about supplier Name2 # Failed test 'Koha::Acquisition::Booksellers->search returns the right informations about supplier Name2' # at t/db_dependent/Bookseller.t line 121. # Structures begin differing at: # $got->{discount} = '2.0000' # $expected->{discount} = '2' ok 10 - Get Supplier1 and Supplier2 not ok 11 - Returns right fields of Supplier1 and Supplier2 # Failed test 'Returns right fields of Supplier1 and Supplier2' # at t/db_dependent/Bookseller.t line 134. # Structures begin differing at: # $got->[0]{discount} = '2.0000' # $expected->[0]{discount} = '2' ok 12 - Supplier1 has 0 basket ok 13 - Supplier1 has 2 baskets ok 14 - find returns undef if no id given not ok 15 - Get Supplier1 (find a bookseller by id) # Failed test 'Get Supplier1 (find a bookseller by id)' # at t/db_dependent/Bookseller.t line 153. # Structures begin differing at: # $got->{discount} = '1.0000' # $expected->{discount} = '1' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20169 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Status|Signed Off |Failed QA --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Marking Failed QA for now (comment#5) Tested with kohadevbox and 4.028 Bookseller.t fails for me too: kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove t/db_dependent/Bookseller.t t/db_dependent/Bookseller.t .. 1/86 # Failed test 'Koha::Acquisition::Booksellers->search returns the right informations about supplier Name2' # at t/db_dependent/Bookseller.t line 121. # Structures begin differing at: # $got->{discount} = '2.0000' # $expected->{discount} = '2' # Failed test 'Returns right fields of Supplier1 and Supplier2' # at t/db_dependent/Bookseller.t line 134. # Structures begin differing at: # $got->[0]{discount} = '2.0000' # $expected->[0]{discount} = '2' # Failed test 'Get Supplier1 (find a bookseller by id)' # at t/db_dependent/Bookseller.t line 153. # Structures begin differing at: # $got->{discount} = '1.0000' # $expected->{discount} = '1' # Looks like you failed 3 tests of 86. t/db_dependent/Bookseller.t .. Dubious, test returned 3 (wstat 768, 0x300) Failed 3/86 subtests Test Summary Report ------------------- t/db_dependent/Bookseller.t (Wstat: 768 Tests: 86 Failed: 3) Failed tests: 9, 11, 15 Non-zero exit status: 3 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20169 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Failed QA |RESOLVED --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> --- Fixed by bug 24408 and bug 20906 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org