Koha-clms/t
Doug Kingston 7a2d830637 Bug 11078: Add locking to rebuild_zebra
This patch adds locking to rebuild_zebra.pl to ensure that simultaneous
changes are prevented (as one is likely to overwrite the other).
Incremental updates in daemon mode will skipped if the lock is busy
and they will be picked up on the next pass.  Non-daemon mode
invocations will also exit immediately if they cannot get the lock
unless the new flag -wait-for-lock is specified, in which case they
will wait until the get the lock and then proceed.

Supporting changes made to Makefile.PL and templates for the new
locking directory (paralleling the other zebra lock directories).
We stash the zebra_lockdir in koha-conf.xml so rebuild_zebra.pl
can find it.

To address earlier QA concerns we:
1. added code to check if flock is available and ignore locking if
it's missing (from M. de Rooy)

2. changed default for adhoc invocations to abort if they cannot
obtain the lock.  Added option -wait-for-lock if the user prefers
to wait until the lock is free, and then continue processing.

3. added missing entry to t/db_dependent/zebra_config.pl

4. added a fallback locking directory of /tmp

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Doug merged the original patch with the QA changes.
Just for the record, noting here that the original patch was tested
extensively too by Martin Renvoize.
I have added a followup for some exceptional cases.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 88e7faf860)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2014-05-27 12:41:28 +02:00
..
Acquisition bug 8854: fix some invoice search filters 2013-11-19 16:12:31 +00:00
Budgets Bug 7304: More permissions for budgets 2012-06-27 16:25:44 +02:00
Koha/Plugin Bug 7804 - Add Koha Plugin System - QA Followup 2 2013-03-20 14:50:19 -04:00
Serials Bug 7688: (follow-up) rewrite 'for' loop in unit tests 2013-10-30 00:38:52 +00:00
db_dependent Bug 11078: Add locking to rebuild_zebra 2014-05-27 12:41:28 +02:00
lib Bug 10298: Mock C4::Context->preference 2013-08-09 16:34:50 +00:00
searchengine Bug 10298: Adapt existing code 2013-08-09 16:36:17 +00:00
00-checkdatabase-version.t Bug 9191 follow-up: remove example updatedatabase stanzas 2012-12-11 08:29:11 -05:00
00-deprecated.t
…
00-load.t Bug 8435: (follow-up) prevent t/00-load.t failing 2013-10-31 18:51:04 +00:00
00-merge-conflict-markers.t Test suite: ignoring backups from vi (files ending with a ~) 2011-12-07 15:17:54 +01:00
00-testcritic.t Bug 8798: (follow-up) remove DBIC_DONT_VALIDATE_RELS 2013-10-14 22:51:44 +00:00
00-valid-xml.t
…
AuthUtils.t Bug 9611: (follow-up) move new password hashing routines to separate module 2013-10-09 03:29:22 +00:00
AuthoritiesMarc_MARC21.t Bug 5327 added unit tests for C4/AuthoritiesMarc/MARC21.pm 2012-01-31 17:21:47 +01:00
AuthoritiesMarc_UNIMARC.t Added unit test for AuthoritiesMarc/UNIMARC.pm 2011-12-15 13:41:41 +01:00
Barcodes_EAN13.t Bug 6448 [2/3] Barcodes::EAN13 autoBarcode 2012-08-02 18:41:44 +02:00
Barcodes_PrinterConfig.t Bug 5327 added unit tests for C4/Barcodes_PrinterConfig.pm 2012-01-31 17:21:48 +01:00
Barcodes_ValueBuilder.t Bug 8524 follow-up: fix broken test 2012-08-31 17:42:44 +02:00
Barcodes_annual.t
…
Barcodes_hbyymmincr.t
…
Barcodes_incremental.t
…
Biblio.t Bug 11032: Check a valid MARC::Record passed to Biblio 2013-12-24 11:50:36 +01:00
Bookseller.t
…
Boolean.t Added missing reference case to Boolean.t and corrected count 2011-12-15 13:50:41 +01:00
Branch.t
…
Breeding.t
…
Budgets.t
…
Cache.t Bug 9434 follow-up: fix number of tests skipped when cache is disabled 2013-03-20 15:50:37 -04:00
Calendar.t Bug 9209: Skip tests for older DBD::Mock 2012-12-28 20:15:36 -05:00
Category.t
…
Charset.t
…
Circulation_barcodedecode.t Bug 6448 [1/3] EAN-13/UPC-A itemBarcodeInputFilter 2012-08-02 18:41:40 +02:00
ClassSortRoutine.t
…
ClassSortRoutine_Dewey.t Bug 9770: test case for sorting of Dewey call numbers that contain prefixes 2013-07-15 16:12:47 +00:00
ClassSortRoutine_Generic.t Bug 5327 added unit tests for C4/ClassSortRoutine/Generic 2012-01-17 15:31:55 +01:00
ClassSortRoutine_LCC.t bug 6281: introduce LC::CallNumber::LC for sorting LC call numbers 2013-06-10 07:56:53 -07:00
ClassSource.t
…
Context.t Bug 8798: DBIx::Class base classes for all Koha tables 2013-10-14 21:07:24 +00:00
Contract.t
…
Creators.t Bug 7952 - followup to fix t/Creators.t 2012-06-14 15:54:06 +02:00
DateUtils.t Bug 10380: (follow-up) remove inadvertant database dependency for t/DateUtils.t 2013-10-18 04:27:42 +00:00
Dates.t
…
Debug.t
…
External_Overdrive.t Followup for bug 10320: minor bugfixes and style improvements 2013-09-08 07:04:02 +00:00
External_Syndetics.t
…
Form_MessagingPreferences.t
…
Heading.t
…
Images.t Bug 5327: Testing c4 Images 2012-09-07 14:42:18 +02:00
ImportBatch.t
…
Input.t
…
Installer_PerlDependencies.t
…
Installer_PerlModules.t Bug 9734 - String::Random is marked as optional, but C4::Members requires it 2013-03-11 07:33:30 -04:00
Installer_pm.t
…
ItemCirculationAlertPreference.t
…
ItemType.t Bug 10513: display a warning/message when returning a chosen item type 2013-09-16 17:45:31 +00:00
Koha.t Bug 9659 - QA Follow up: Unit tests 2013-04-26 08:07:24 -04:00
Koha_MetadataRecord.t Bug 9755 QA follow-up: move MARC-specific functionality to utility class 2013-07-23 23:10:21 +00:00
Koha_Util_MARC.t Bug 5202: merge authorities from the authority file and reservoir 2013-10-10 21:32:27 +00:00
Labels.t Bug 11402: (follow-up) add one more unit test 2014-01-27 14:42:21 +01:00
Labels_split_ccn.t
…
Labels_split_ddcn.t
…
Labels_split_lccn.t bug 9370: add invalid call number to LC splitting test cases 2013-06-12 07:44:05 -07:00
Languages.t Bug 5327 added tests for C4/Languages.pm 2012-01-31 17:21:51 +01:00
Letters.t Bug 10843: fix crash that can occur when confirming hold if ReservesMaxPickUpDelay is undefined 2013-10-18 06:16:57 +00:00
Log.t
…
Maintainance.t
…
Matcher.t Bug 5327 Tests for C4::Matcher 2012-09-07 14:31:52 +02:00
Members_AttributeTypes.t Bug 7919: Fix unit test (Members_AttributeTypes.t) 2012-12-07 18:26:37 -05:00
Members_Attributes.t
…
Members_Messaging.t
…
Message.t
…
NewsChannels.t
…
Output.t Bug 10016: force zero browser-side caching of SCO pages 2013-10-21 18:05:12 +00:00
Output_JSONStream.t
…
Overdues.t
…
Patroncards.t
…
Patroncards_Batch.t
…
Patroncards_Layout.t
…
Patroncards_Lib.t
…
Patroncards_Patroncard.t
…
Patroncards_Profile.t
…
Patroncards_Template.t
…
Print.t
…
QueryParser.t Bug 11202: (follow-up) update number of expected tests for t/QueryParser.t 2014-05-19 17:27:59 +02:00
RecordProcessor.t Bug 7417: Include see from references in bibliographic searches 2012-09-13 14:19:28 +02:00
Review.t
…
Ris.t bug 5327 added unit tests for C4/Ris.pm 2012-01-31 17:21:49 +01:00
RotatingCollections.t
…
SIP_Sip.t Added unit tests for Sip Checksum.pm 2011-12-15 13:41:37 +01:00
SMS.t
…
Scheduler.t Bug 5327 added unit tests for C4/Scheduler.pm 2012-01-31 17:21:49 +01:00
Scrubber.t Added unit tests for Scrubber 2011-12-15 13:41:43 +01:00
Search_PazPar2.t Bug 5327 added unit tests for C4/Search_PazPar2.pm 2012-01-31 17:21:50 +01:00
SimpleMARC.t Bug 8015: Add unit tests for SimpleMARC and MarcModificationTemplates routines 2013-10-31 22:50:11 +00:00
SocialData.t Bug 5327: Unit tests for C4 socialdata 2012-09-07 14:32:00 +02:00
Stats.t
…
SuggestionEngine.t Bug 8726 follow-up: fix QA issues 2012-09-28 17:14:15 +02:00
SuggestionEngine_AuthorityFile.t Merge remote-tracking branch 'origin/new/bug_8209' 2012-10-01 16:39:52 +02:00
Templates.t Bug 10560: add regression test 2013-07-12 14:57:11 +00:00
TmplToken.t Bug 5327 added unit tests for C4/TmplToken.pm 2012-01-31 17:21:50 +01:00
VirtualShelves_Merge.t
…
XSLT.t bug 10292: improve fallback logic for picking XSLT 2013-05-29 07:39:41 -07:00
dummy.t
…
perlcriticrc Updating perlcriticrc to allow Modern::Perl to suffice instead of use warnings; and use strict; 2012-01-27 11:33:15 +01:00
smolder_smoke_signal
…