Summary: | Koha/Acquisition/Orders.t is failing randomly | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Test Suite | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, kyle, m.de.rooy |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.11.00,21.05.03
|
|
Bug Depends on: | 25670 | ||
Bug Blocks: | 25551 | ||
Attachments: |
Bug 28509: Prevent Koha/Acquisition/Orders.t to fail randomly
Bug 28509: Prevent Koha/Acquisition/Orders.t to fail randomly |
Description
Jonathan Druart
2021-06-03 07:52:21 UTC
Master_D9_MDB_Latest/612 Koha_21.05_D9/26 D5 (In reply to Jonathan Druart from comment #1) > Master_D9_MDB_Latest/612 This was on Docker_2. (In reply to Jonathan Druart from comment #3) > (In reply to Jonathan Druart from comment #1) > > Master_D9_MDB_Latest/612 > > This was on Docker_2. 16:36:15 koha_1 | # Failed test 'The 2 orders are returned' 16:36:15 koha_1 | # at t/db_dependent/Koha/Acquisition/Orders.t line 152. 16:36:15 koha_1 | # Structures begin differing at: 16:36:15 koha_1 | # $got->[0] = '100' 16:36:15 koha_1 | # $expected->[0] = '99' 16:36:15 koha_1 | # Looks like you failed 1 test of 4. 16:36:15 koha_1 | 16:36:15 koha_1 | # Failed test 'filter_by_id_including_transfers() tests' 16:36:15 koha_1 | # at t/db_dependent/Koha/Acquisition/Orders.t line 160. (In reply to Jonathan Druart from comment #2) > Koha_21.05_D9/26 D5 16:51:24 koha_1 | # Failed test 'The 2 orders are returned' 16:51:24 koha_1 | # at t/db_dependent/Koha/Acquisition/Orders.t line 152. 16:51:24 koha_1 | # Structures begin differing at: 16:51:24 koha_1 | # $got->[0] = '10' 16:51:24 koha_1 | # $expected->[0] = '9' 16:51:24 koha_1 | # Looks like you failed 1 test of 4. 16:51:24 koha_1 | 16:51:24 koha_1 | # Failed test 'filter_by_id_including_transfers() tests' Created attachment 122942 [details] [review] Bug 28509: Prevent Koha/Acquisition/Orders.t to fail randomly The random errors were: 03:25:39 koha_1 | # Structures begin differing at: 03:25:39 koha_1 | # $got->[0] = '10' 03:25:39 koha_1 | # $expected->[0] = '9' and 16:36:15 koha_1 | # Structures begin differing at: 16:36:15 koha_1 | # $got->[0] = '100' 16:36:15 koha_1 | # $expected->[0] = '99' You see it coming? We sorted the ordernumbers alphabetically. Test plan: 0. Don't apply this patch 1. % git checkout v21.05.01 # The error is not appearing in master right now 2. Add 2 warn statements before the 'The 2 orders are returned' tests to display $order_1->ordernumber and $order_2->ordernumber 3. MariaDB CLI > ALTER TABLE aqorders AUTO_INCREMENT=3; 4. prove t/db_dependent/Koha/Acquisition/Orders.t => Fail with # Structures begin differing at: # $got->[0] = '10' # $expected->[0] = '9' 5. Apply this patch, repeat 3. and 4. => The test passes now. Created attachment 123293 [details] [review] Bug 28509: Prevent Koha/Acquisition/Orders.t to fail randomly The random errors were: 03:25:39 koha_1 | # Structures begin differing at: 03:25:39 koha_1 | # $got->[0] = '10' 03:25:39 koha_1 | # $expected->[0] = '9' and 16:36:15 koha_1 | # Structures begin differing at: 16:36:15 koha_1 | # $got->[0] = '100' 16:36:15 koha_1 | # $expected->[0] = '99' You see it coming? We sorted the ordernumbers alphabetically. Test plan: 0. Don't apply this patch 1. % git checkout v21.05.01 # The error is not appearing in master right now 2. Add 2 warn statements before the 'The 2 orders are returned' tests to display $order_1->ordernumber and $order_2->ordernumber 3. MariaDB CLI > ALTER TABLE aqorders AUTO_INCREMENT=3; 4. prove t/db_dependent/Koha/Acquisition/Orders.t => Fail with # Structures begin differing at: # $got->[0] = '10' # $expected->[0] = '9' 5. Apply this patch, repeat 3. and 4. => The test passes now. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Pushed to master for 21.11, thanks to everybody involved! Pushed to 21.05.x for 21.05.03 Depends on Bug 25670 not in 20.11.x |