FileDocCategorySizeDatePackage
TestLock.javaAPI DocApache Lucene 1.93525Mon Feb 20 09:19:22 GMT 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);
        }