Koha_Master/2396 koha_1 | # Failed test 'The item is no longer present' koha_1 | # at t/db_dependent/Koha/Acquisition/Order.t line 693. koha_1 | # got: 'Koha::Item=HASH(0x5635919db9a8)' koha_1 | # expected: undef koha_1 | koha_1 | # Failed test 'No messages' koha_1 | # at t/db_dependent/Koha/Acquisition/Order.t line 696. koha_1 | # got: '1' koha_1 | # expected: '0' koha_1 | koha_1 | # Failed test 'The item is no longer present' koha_1 | # at t/db_dependent/Koha/Acquisition/Order.t line 728. koha_1 | # got: 'Koha::Item=HASH(0x563591a190f0)' koha_1 | # expected: undef koha_1 | koha_1 | # Failed test 'Cannot delete biblio and it gets notified' koha_1 | # at t/db_dependent/Koha/Acquisition/Order.t line 732. koha_1 | # got: 'error_delitem' koha_1 | # expected: 'error_delbiblio_items' koha_1 | koha_1 | # Failed test 'The item is no longer present' koha_1 | # at t/db_dependent/Koha/Acquisition/Order.t line 776. koha_1 | # got: 'Koha::Item=HASH(0x5635919db468)' koha_1 | # expected: undef koha_1 | koha_1 | # Failed test 'Cannot delete biblio and it gets notified' koha_1 | # at t/db_dependent/Koha/Acquisition/Order.t line 779. koha_1 | # got: 'error_delitem' koha_1 | # expected: 'error_delbiblio_active_orders' koha_1 | koha_1 | # Failed test 'The item is no longer present' koha_1 | # at t/db_dependent/Koha/Acquisition/Order.t line 820. koha_1 | # got: 'Koha::Item=HASH(0x563591a450a0)' koha_1 | # expected: undef koha_1 | koha_1 | # Failed test 'Cannot delete biblio and it gets notified' koha_1 | # at t/db_dependent/Koha/Acquisition/Order.t line 823. koha_1 | # got: 'error_delitem' koha_1 | # expected: 'error_delbiblio_subscriptions' koha_1 | koha_1 | # Failed test 'The item is not present' koha_1 | # at t/db_dependent/Koha/Acquisition/Order.t line 853. koha_1 | # got: 'Koha::Item=HASH(0x563591a16320)' koha_1 | # expected: undef koha_1 | koha_1 | # Failed test 'The biblio is not present' koha_1 | # at t/db_dependent/Koha/Acquisition/Order.t line 854. koha_1 | # got: 'Koha::Biblio=HASH(0x563591a69bd8)' koha_1 | # expected: undef koha_1 | koha_1 | # Failed test 'No errors' koha_1 | # at t/db_dependent/Koha/Acquisition/Order.t line 856. koha_1 | # got: '2' koha_1 | # expected: '0' koha_1 | koha_1 | # Failed test 'The item is no longer present' koha_1 | # at t/db_dependent/Koha/Acquisition/Order.t line 905. koha_1 | # got: 'Koha::Item=HASH(0x563591a7a1e8)' koha_1 | # expected: undef koha_1 | koha_1 | # Failed test 'Cannot delete on loan item' koha_1 | # at t/db_dependent/Koha/Acquisition/Order.t line 910. koha_1 | # got: '680' koha_1 | # expected: '681' koha_1 | koha_1 | # Failed test 'Item on loan notified' koha_1 | # at t/db_dependent/Koha/Acquisition/Order.t line 911. koha_1 | # got: 'not_same_branch' koha_1 | # expected: 'book_on_loan' koha_1 | koha_1 | # Failed test 'Cannot delete reserved and found item' koha_1 | # at t/db_dependent/Koha/Acquisition/Order.t line 913. koha_1 | # got: '681' koha_1 | # expected: '682' koha_1 | koha_1 | # Failed test 'Item reserved notified' koha_1 | # at t/db_dependent/Koha/Acquisition/Order.t line 914. koha_1 | # got: 'book_on_loan' koha_1 | # expected: 'book_reserved' koha_1 | koha_1 | # Failed test 'Cannot delete on loan item' koha_1 | # at t/db_dependent/Koha/Acquisition/Order.t line 915. koha_1 | # got: 'error_delitem' koha_1 | # expected: 'error_delbiblio_items' koha_1 | # Looks like you planned 54 tests but ran 51. koha_1 | # Looks like you failed 17 tests of 51 run. koha_1 | koha_1 | # Failed test 'cancel() tests' koha_1 | # at t/db_dependent/Koha/Acquisition/Order.t line 940.
Created attachment 147234 [details] [review] Bug 33054: Remove use of can_edit_items Test Plan: 1) Apply this patch 2) prove t/db_dependent/Koha/Acquisition/Order.t 3) git grep "can_edit_item(" should return no results
Did you understand why the failure was occurring randomly?
Created attachment 147396 [details] [review] Bug 33054: Fix unit tests This patch fixes the tests by making sure: - The branch in userenv matches the home/holding branch so there are no circ rules getting in the middle - Gives the user superlibrarian permissions for the same reasons above. To test: 1. Run: $ ktd --shell k$ for i in $(seq 1 20 ); do prove t/db_dependent/Koha/Acquisition/Order.t ; done => FAIL: Notice it fails quite often. You can ctrl+c to interrupt once it has failed at least once. 2. Apply this patch 3. Repeat 1 => SUCCESS: it doesn't fail a single time 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed to master for 23.05. Nice work everyone, thanks!
Nice work everyone! Pushed to stable for 22.11.x
Missing dependencies for 22.05.x, no backport.