[Koha-bugs] [Bug 33584] Fix failures for Database/Commenter.t on MySQL 8

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Apr 24 12:34:14 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33584

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david at davidnind.com

--- Comment #5 from David Nind <david at davidnind.com> ---
I tested using KTD (changed database in .env file from DB_IMAGE=mariadb:10.5 to
DB_IMAGE=mysql:8).

I also tested using the default database (mariadb:10.5) - the tests pass before
and after the patch is applied.

Before patch applied (MySQL 8)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Before the patch was applied, I got these results:

prove t/db_dependent/Koha/Database/Commenter.t
t/db_dependent/Koha/Database/Commenter.t .. 
    #   Failed test 'No comment for toc_request'
    #   at t/db_dependent/Koha/Database/Commenter.t line 34.
    #          got: '0'
    #     expected: '1'
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.

    #   Failed test 'Numbered comment for toc_request'
    #   at t/db_dependent/Koha/Database/Commenter.t line 39.
    #          got: '0'
    #     expected: '1'

    #   Failed test 'Reset for one-columned article_requests'
    #   at t/db_dependent/Koha/Database/Commenter.t line 49.
    #                   'ALTER TABLE koha_kohadev.article_requests MODIFY
COLUMN `toc_request` tinyint NOT NULL DEFAULT 0 COMMENT 'borrower requested
table of contents';'
    #     doesn't match '(?^um:ALTER.*toc_request.*DEFAULT
0;(.*\n)+ALTER.*toc_request.*COMMENT.*$)'
    # Looks like you failed 3 tests of 6.
t/db_dependent/Koha/Database/Commenter.t .. 1/2 
#   Failed test '->new, dry_run'
#   at t/db_dependent/Koha/Database/Commenter.t line 52.

    #   Failed test 'Found no comment for sometext'
    #   at t/db_dependent/Koha/Database/Commenter.t line 61.
    #          got: 'some nice quote's'
    #     expected: ''

    #   Failed test 'Found no comment for anotherint'
    #   at t/db_dependent/Koha/Database/Commenter.t line 62.
    #          got: 'my int'
    #     expected: ''
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.
Use of uninitialized value in string ne at
/kohadevbox/koha/Koha/Database/Commenter.pm line 147.

    #   Failed test 'Found Column_1'
    #   at t/db_dependent/Koha/Database/Commenter.t line 73.
    #          got: 'my int'
    #     expected: 'Column_1'

    #   Failed test 'Found Column_5'
    #   at t/db_dependent/Koha/Database/Commenter.t line 74.
    #          got: ''
    #     expected: 'Column_5'
    # Looks like you failed 4 tests of 6.

#   Failed test '->clear, ->reset, ->renumber'
#   at t/db_dependent/Koha/Database/Commenter.t line 78.
# Looks like you failed 2 tests of 2.
t/db_dependent/Koha/Database/Commenter.t .. Dubious, test returned 2 (wstat
512, 0x200)
Failed 2/2 subtests 

Test Summary Report
-------------------
t/db_dependent/Koha/Database/Commenter.t (Wstat: 512 Tests: 2 Failed: 2)
  Failed tests:  1-2
  Non-zero exit status: 2
Files=1, Tests=2,  1 wallclock secs ( 0.01 usr  0.00 sys +  0.50 cusr  0.03
csys =  0.54 CPU)
Result: FAIL

After the patch was applied (MySQL 8)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

After the patch was applied, I got these results:

prove t/db_dependent/Koha/Database/Commenter.t
t/db_dependent/Koha/Database/Commenter.t .. 1/2 Failure for
database_commenter_1:timestamp2 at /kohadevbox/koha/Koha/Database/Commenter.pm
line 266.

    #   Failed test 'Found Column_5'
    #   at t/db_dependent/Koha/Database/Commenter.t line 80.
    #          got: ''
    #     expected: 'Column_5'
    # Looks like you failed 1 test of 6.

#   Failed test '->clear, ->reset, ->renumber'
#   at t/db_dependent/Koha/Database/Commenter.t line 84.
# Looks like you failed 1 test of 2.
t/db_dependent/Koha/Database/Commenter.t .. Dubious, test returned 1 (wstat
256, 0x100)
Failed 1/2 subtests 

Test Summary Report
-------------------
t/db_dependent/Koha/Database/Commenter.t (Wstat: 256 Tests: 2 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=1, Tests=2,  1 wallclock secs ( 0.02 usr  0.00 sys +  0.50 cusr  0.06
csys =  0.58 CPU)
Result: FAIL

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list