Fixes bug 1158179
In the case that the lock_path does not exist and there is a contested
resource then the process that was waiting on the lock will not
be locking due to the fact that the directory was deleted.
Change-Id: I75d720d4df499e85386d3e2cc86b927b017e12ac
Add a unit test which fails because of #1107950 - in this case,
lockutils is deleting the lock directory every time the lock is dropped
even though another process might have acquired a lock using that
directory.
Change-Id: Ic82409f9462e570bc102ab469334c53aafc6d7ac
Use a separate directory for the lockutils external locks and for the
test's flocks which are used to check that serialization is actually
occurring. By using the same directory, we can't test the code in
lockutils which auto-creates this directory because the dir gets
deleted by a process by lockutils cleanup while another directory
is using it for flocks.
Also, assume the the handles directory has been created in the parent
rather than having each child attempt to create it.
Related, add a try/finally block so that when a child process throws an
exception it immediately exits rather than deleting the temporary
directories created by the parent.
Change-Id: I32d7e8e05fb3f22cf38fa586f8bc97646c83f182
Using the BaseTestCase across the tests in the tree lets us put in log
fixtures and consistently handle mox and stubout.
Part of blueprint grizzly-testtools.
Change-Id: Iba7eb2c63b0c514009b2c28e5930b27726a147b0
On the path to testr migration, we need to replace the unittest base classes
with testtools.
Replace tearDown with addCleanup, addCleanup is more resilient than tearDown.
The fixtures library has excellent support for managing and cleaning
tempfiles. Use it.
Replace skip_ with testtools.skipTest
Part of blueprint grizzly-testtools.
Change-Id: I45e11bbb1ff9b31f3278d3b016737dcb7850cd98
Fork many processes and try to lock the same set of files
using flock without blocking and make sure we wait for all the processes
to finish as well.
Fixes LP #1068316
Change-Id: I09964b2c5af63f31b5ddee1f18eaf646f8d8ba58
We're seeing this test fail very regularly in Jenkins and it's become
a serious distraction for everyone.
Disable the test temporarily and use a bug #1095957 to track that the
test itself needs fixing.
Change-Id: I0645d8f5f740d40f83d82e5ef7a048f33a44ac2b