Bug 40018 - Remove warning from Koha/Template/Plugin/Koha.t
Summary: Remove warning from Koha/Template/Plugin/Koha.t
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: 24.11
Hardware: All All
: P5 - low minor
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 25515
  Show dependency treegraph
 
Reported: 2025-05-28 14:37 UTC by Jonathan Druart
Modified: 2025-05-30 21:51 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 40018: Remove warnings from Koha/Template/Plugin/Koha.t (2.65 KB, patch)
2025-05-28 14:38 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40018: Remove warnings from Koha/Template/Plugin/Koha.t (2.60 KB, patch)
2025-05-28 14:40 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40018: Remove warnings from Koha/Template/Plugin/Koha.t (2.65 KB, patch)
2025-05-30 21:48 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2025-05-28 14:37:12 UTC
rollback ineffective with AutoCommit enabled
Comment 1 Jonathan Druart 2025-05-28 14:38:55 UTC
Created attachment 182822 [details] [review]
Bug 40018: Remove warnings from Koha/Template/Plugin/Koha.t

Because we still use CGI::Session (bug 17427), we need to mock
CGI::Session to remove those 2 warnings
rollback ineffective with AutoCommit enabled

Test plan:
Run the tests after this patch, it should be green
Comment 2 Jonathan Druart 2025-05-28 14:40:02 UTC
Created attachment 182823 [details] [review]
Bug 40018: Remove warnings from Koha/Template/Plugin/Koha.t

Because we still use CGI::Session (bug 17427), we need to mock
CGI::Session to remove those 2 warnings
rollback ineffective with AutoCommit enabled

Test plan:
Run the tests after this patch, it should be green
Comment 3 David Nind 2025-05-30 21:48:51 UTC
Created attachment 182868 [details] [review]
Bug 40018: Remove warnings from Koha/Template/Plugin/Koha.t

Because we still use CGI::Session (bug 17427), we need to mock
CGI::Session to remove those 2 warnings
rollback ineffective with AutoCommit enabled

Test plan:
Run the tests after this patch, it should be green

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2025-05-30 21:51:05 UTC
Testing notes (using KTD):

1. Tests pass before and after the patch: prove t/db_dependent/Koha/Template/Plugin/Koha.t 

2. Before the patch, there are warnings:

prove t/db_dependent/Koha/Template/Plugin/Koha.t 
t/db_dependent/Koha/Template/Plugin/Koha.t .. rollback ineffective with AutoCommit enabled at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1773.
t/db_dependent/Koha/Template/Plugin/Koha.t .. 1/2 rollback ineffective with AutoCommit enabled at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1773.
t/db_dependent/Koha/Template/Plugin/Koha.t .. ok   
All tests successful.
Files=1, Tests=2,  1 wallclock secs ( 0.02 usr  0.01 sys +  0.97 cusr  0.16 csys =  1.16 CPU)
Result: PASS

3. After the patch, there are no warnings:

rove t/db_dependent/Koha/Template/Plugin/Koha.t 
t/db_dependent/Koha/Template/Plugin/Koha.t .. rollback ineffective with AutoCommit enabled at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1773.
t/db_dependent/Koha/Template/Plugin/Koha.t .. 1/2 rollback ineffective with AutoCommit enabled at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1773.
t/db_dependent/Koha/Template/Plugin/Koha.t .. ok   
All tests successful.
Files=1, Tests=2,  1 wallclock secs ( 0.02 usr  0.01 sys +  0.97 cusr  0.16 csys =  1.16 CPU)
Result: PASS

4. I tested on the latest main.