]> git.koha-community.org Git - koha.git/commit
Bug 33834: Fix random failure on api/v1/ill_requests.t
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 25 May 2023 13:15:08 +0000 (10:15 -0300)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Thu, 8 Jun 2023 17:15:33 +0000 (17:15 +0000)
commit4f28cd3227bb18c60bd7987bdd0f220c5ebe0c4f
tree61672a77c3173d7dcc1efdaf8eb2372dd8157c36
parent5052f9cec069ba6429d0a5c0c4525b1b0ee791e4
Bug 33834: Fix random failure on api/v1/ill_requests.t

This patch makes the GET request results more deterministic so we avoid
random failures. It does so by adding a fixed value to each ILL request
and then sorting by it.

To test:
1. Run:
   $ DB_IMAGE=mysqli:8.0 ktd up -d
   # wait until it finished:
   $ ktd --logs
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/ill_requests.t
  (repeat a few times)
=> FAIL: It sometimes fails
3. Apply this patch
4. Repeat 2
=> SUCCESS: It doesn't fail
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1a8903ae850ca268c730e19c1b575e3be942ee2b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
t/db_dependent/api/v1/ill_requests.t