FileDocCategorySizeDatePackage
TestLock.javaAPI DocApache Lucene 2.0.03506Fri May 26 09:54:08 BST 2006org.apache.lucene.store

TestLock

public class TestLock extends TestCase

Fields Summary
Constructors Summary
Methods Summary
public voidtestObtain()

        LockMock lock = new LockMock();
        Lock.LOCK_POLL_INTERVAL = 10;

        try {
            lock.obtain(Lock.LOCK_POLL_INTERVAL);
            fail("Should have failed to obtain lock");
        } catch (IOException e) {
            assertEquals("should attempt to lock more than once", lock.lockAttempts, 2);
        }