lock.lock(FileLock.LOCK_FILE);
lock.unlock();
}
private void testSimple() {
FileLock lock1 = new FileLock(new TraceSystem(null), getFile(), Constants.LOCK_SLEEP);
FileLock lock2 = new FileLock(new TraceSystem(null), getFile(), Constants.LOCK_SLEEP);
lock1.lock(FileLock.LOCK_FILE);
createClassProxy(FileLock.class);
assertThrows(ErrorCode.DATABASE_ALREADY_OPEN_1, lock2).
lock(FileLock.LOCK_FILE);
lock1.unlock();
lock2 = new FileLock(new TraceSystem(null), getFile(), Constants.LOCK_SLEEP);
lock2.lock(FileLock.LOCK_FILE);
lock2.unlock();
}