Bug 32343

Summary: Koha/Patron.t is failing randomly
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: martin.renvoize
Version: unspecifiedKeywords: rel_22_11_candidate
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32350
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Bug Depends on:    
Bug Blocks: 25551    
Attachments: Bug 32343: Prevent Koha/Patron.t to fail randomly
Bug 32343: Prevent Koha/Patron.t to fail randomly

Description Jonathan Druart 2022-11-25 06:26:26 UTC
t/db_dependent/Koha/Patron.t ..                                                                           
        #   Failed test 'Exception thrown on unique attribute'                                                                                                                                                       
        #   at t/db_dependent/Koha/Patron.t line 251.                                                                                                                                                                
        # expecting: Koha::Exceptions::Patron::Attribute::UniqueIDConstraint                                                                                                                                         
        # found: normal exit                                                                                                                                                                                         
                                                                                                          
        #   Failed test 'Extended attributes storing rolled back'                                         
        #   at t/db_dependent/Koha/Patron.t line 255.                           
        #          got: '2'                                                                               
        #     expected: '0'                                                                               
        # Looks like you failed 2 tests of 5.                                                                                                                                                                        
                                                                                                          
    #   Failed test 'unique attributes tests'                                                                                                                                                                        
    #   at t/db_dependent/Koha/Patron.t line 259.                                                         
    # Looks like you failed 1 test of 16.                                                                                                                                                                            
t/db_dependent/Koha/Patron.t .. 1/1                                                                       
#   Failed test 'extended_attributes'                                                                     
#   at t/db_dependent/Koha/Patron.t line 393.
Comment 1 Jonathan Druart 2022-11-25 06:27:56 UTC
Created attachment 144223 [details] [review]
Bug 32343: Prevent Koha/Patron.t to fail randomly

Highlighted by Bug 32030: fix test builder for boolean

The attribute is named "unique_id", not "unique"
Comment 2 Martin Renvoize 2022-11-25 07:55:57 UTC
Created attachment 144224 [details] [review]
Bug 32343: Prevent Koha/Patron.t to fail randomly

Highlighted by Bug 32030: fix test builder for boolean

The attribute is named "unique_id", not "unique"

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize 2022-11-25 07:56:32 UTC
Fix confirmed, going straight for QA.

Passed
Comment 4 Martin Renvoize 2022-11-25 07:57:04 UTC
This makes me wonder however.. should we be throwing errors in testbuilder if we're passed unrecognised fields in the values param?
Comment 5 Jonathan Druart 2022-11-25 08:45:50 UTC
(In reply to Martin Renvoize from comment #4)
> This makes me wonder however.. should we be throwing errors in testbuilder
> if we're passed unrecognised fields in the values param?

Bue 32350
Comment 6 Tomás Cohen Arazi 2022-11-25 12:46:56 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!