|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.opencms.test.OpenCmsTestCase
org.opencms.file.TestLock
public class TestLock
Unit tests for lock operation.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.opencms.test.OpenCmsTestCase |
---|
OpenCmsTestCase.ConnectionData |
Field Summary |
---|
Fields inherited from class org.opencms.test.OpenCmsTestCase |
---|
ARTICLE_TYPEID, DB_MYSQL, DB_ORACLE, m_additionalConnection, m_configuration, m_currentResourceStrorage, m_defaultConnection, m_defaultTablespace, m_indexTablespace, m_resourceStorages, m_setupConnection, m_tempTablespace |
Constructor Summary | |
---|---|
TestLock(String arg0)
Default JUnit constructor. |
Method Summary | |
---|---|
static junit.framework.Test |
suite()
Test suite for this test class. |
void |
testCopyToLockedFolder()
Tests copying a file to a folder locked by another user. |
void |
testCreationInLockedFolder()
Tests creating a new file in a folder locked by another user. |
void |
testLockFilter()
Test the lock filter. |
void |
testLockForBaseOperations()
Tests lock status of a resource for basic operations. |
void |
testLockForFile()
Tests lock status of a file and its siblings. |
void |
testLockForFolder()
Tests lock status of a folder and its siblings. |
void |
testLockForFolderPrelockedExclusive()
Tests lock status of a folder and its siblings. |
void |
testLockForFolderPrelockedShared()
Tests lock status of a folder and its siblings. |
void |
testLockForSiblings()
Tests lock status of a resource during sibling creation. |
void |
testLockInherit()
Tests an inherited lock in a resource delete scenario. |
void |
testLockOtherUser()
Tests a lock set by other user. |
void |
testLockRequired()
Ensures that a lock is required for all write/control operations. |
void |
testLockSteal()
Tests to steal a lock. |
void |
testLockWithDeletedNewFiles()
Tests lock status after a new file has been deleted in offline project. |
void |
testTempFileCreationInLockedFolder()
Tests creating a new temporary file in a folder locked by another user. |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TestLock(String arg0)
arg0
- JUnit parametersMethod Detail |
---|
public static junit.framework.Test suite()
public void testCopyToLockedFolder() throws Exception
Exception
- if the test failspublic void testCreationInLockedFolder() throws Exception
Exception
- if the test failspublic void testLockFilter() throws Throwable
Throwable
- is something goes wrongpublic void testLockForBaseOperations() throws Throwable
Throwable
- if something goes wrongpublic void testLockForFile() throws Throwable
Throwable
- if something goes wrongpublic void testLockForFolder() throws Throwable
Throwable
- if something goes wrongpublic void testLockForFolderPrelockedExclusive() throws Throwable
In this test, the folder has some pre-locked siblings with exclusive locks in it
Throwable
- if something goes wrongpublic void testLockForFolderPrelockedShared() throws Throwable
In this test, the folder has some prelocked siblings with shared locks in it
Throwable
- if something goes wrongpublic void testLockForSiblings() throws Throwable
Throwable
- if something goes wrongpublic void testLockInherit() throws Throwable
Throwable
- if something goes wrongpublic void testLockOtherUser() throws Throwable
Throwable
- if something goes wrongpublic void testLockRequired() throws Throwable
Throwable
- if something goes wrongpublic void testLockSteal() throws Throwable
Throwable
- if something goes wrongpublic void testLockWithDeletedNewFiles() throws Throwable
Issue description: User A creates a new file, but deletes it without ever publishing it. Now user B create a new file with the same name / path. The file was still in the lock manager but for user A, this generated an error for user B.
Solution: Remove new files that are deleted from the lock manager.
Throwable
- if something goes wrongpublic void testTempFileCreationInLockedFolder() throws Exception
Exception
- if the test fails
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |