Bug 40404 - t/Test/Mock/Logger.t generates warnings
Summary: t/Test/Mock/Logger.t generates warnings
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 38818
Blocks: 25515
  Show dependency treegraph
 
Reported: 2025-07-16 09:07 UTC by Jonathan Druart
Modified: 2025-07-16 09:11 UTC (History)
0 users

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 40404: Remove diag from t/Test/Mock/Logger.t (2.40 KB, patch)
2025-07-16 09:09 UTC, Jonathan Druart
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-07-16 09:07:43 UTC
t/Test/Mock/Logger.t .. 1/10     # trace:                                                                 
    #    (No trace messages)                                                                                                                                                                                         
    # debug:                                                                                                                                                                                                         
    #     "Debug message" at /usr/share/perl/5.36/Test/Builder.pm line 374                                
    # info:                                                                                                                                                                                                          
    #    (No info messages)                                                                               
    # warn:                                                                                                                                                                                                          
    #    (No warn messages)                                                                                                                                                                                          
    # error:                                                                                              
    #    (No error messages)                                                                              
    # fatal:                                                                                              
    #    (No fatal messages)                                                                                                                                                                                         
t/Test/Mock/Logger.t .. ok                                                                                                                                                                                           
All tests successful.                                                                                     
Files=1, Tests=10,  0 wallclock secs ( 0.03 usr  0.00 sys +  0.40 cusr  0.07 csys =  0.50 CPU)            
Result: PASS
Comment 1 Jonathan Druart 2025-07-16 09:09:46 UTC
Created attachment 184127 [details] [review]
Bug 40404: Remove diag from t/Test/Mock/Logger.t

t/Test/Mock/Logger.t .. 1/10     # trace:
    #    (No trace messages)
    # debug:
    #     "Debug message" at /usr/share/perl/5.36/Test/Builder.pm line 374
    # info:
    #    (No info messages)
    # warn:
    #    (No warn messages)
    # error:
    #    (No error messages)
    # fatal:
    #    (No fatal messages)
t/Test/Mock/Logger.t .. ok
All tests successful.
Files=1, Tests=10,  0 wallclock secs ( 0.03 usr  0.00 sys +  0.40 cusr  0.07 csys =  0.50 CPU)
Result: PASS

This one is a bit tricky: we cannot use Test::Warn to capture the output because Test::Builder->diag does not write directly to STDERR.
It has its own failure_output handle (which defaults to STDERR) but bypasses Perl’s standard layers.