]> git.koha-community.org Git - koha.git/commit
Bug 31795: (follow-up) Mock call to FindDuplicateAuthority
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 11 Apr 2023 15:04:17 +0000 (12:04 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 5 May 2023 13:18:44 +0000 (10:18 -0300)
commitbdc2deba999e8a9b74d53108a66a9cc88732cf9f
tree4a53183f192d2a26f99a87b1ba5aa705d3bde56a
parent138c370746ce204bd646d11f6599d4b9582f3d2b
Bug 31795: (follow-up) Mock call to FindDuplicateAuthority

When running against Zebra, this tests fail because it requires the
record to be indexed timely. In theory, a 5 seconds delay should be
enough for the indexer to pick up. But that's not the point of the test,
and we should better just mock the query in this case.

To test:
1. Have ktd launch with zebra:
   $ ktd up -d
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/authorities.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Launch ktd with ES:
   $ ktd down
   $ ktd --es7 up -d
6. Repeat 2
=> SUCCESS: Tests pass!
7. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/REST/V1/Authorities.pm
t/db_dependent/api/v1/authorities.t