]> git.koha-community.org Git - koha.git/commit
Bug 28509: Prevent Koha/Acquisition/Orders.t to fail randomly
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 19 Jul 2021 12:35:11 +0000 (14:35 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 6 Aug 2021 11:49:14 +0000 (07:49 -0400)
commita09f673471671867e88f9c11553289cb3e4b7328
tree54787e93f447694c368d8c7db0be3f8cf3d7ff6c
parent692b78e496d7b2ee5ea1b2a0de3fbf3ce379b41c
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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
t/db_dependent/Koha/Acquisition/Orders.t