|
||||||||
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.TestPublishIssues
public class TestPublishIssues
Comment for TestPermissions
.
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 | |
---|---|
TestPublishIssues(String arg0)
Default JUnit constructor. |
Method Summary | |
---|---|
static junit.framework.Test |
suite()
Test suite for this test class. |
void |
testDirectPublishWithSiblings()
Tests publish scenario "publish all Siblings". |
void |
testMultipleProjectCreation()
Tests multiple creation of a project with the same name. |
void |
testMultipleProjectCreationGalore()
Tries to create very many projects with the same name. |
void |
testPublishFolderWithChangedFileFromOtherProject()
Tests publishing a deleted folder containing a file that was changed in other project. |
void |
testPublishFolderWithDeletedFileFromOtherProject()
Tests publishing a deleted folder containing a file that was deleted in other project. |
void |
testPublishFolderWithNewFileFromOtherProject()
Tests publishing a deleted folder containing a file that was new created in other project. |
void |
testPublishScenarioA()
Tests publish scenario "A". |
void |
testPublishScenarioB()
Tests publish scenario "B". |
void |
testPublishScenarioC()
Tests publish scenario "C". |
void |
testPublishScenarioD()
Tests publish scenario "D". |
void |
testPublishScenarioE()
Tests publish scenario "E". |
void |
testPublishScenarioF()
Tests publish scenario "F". |
void |
testPublishScenarioG()
Tests publish scenario "G". |
void |
testPublishScenarioH()
Tests publish scenario "H". |
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 TestPublishIssues(String arg0)
arg0
- JUnit parametersMethod Detail |
---|
public static junit.framework.Test suite()
public void testDirectPublishWithSiblings() throws Throwable
This scenario is described as follows: If a direct publish is made, and the option "publish all siblings" is selected, a file that contains siblings will be added multiple times to the publish list, causing a primary key collision in the publish history table.
Throwable
- if something goes wrongpublic void testMultipleProjectCreation() throws Exception
Exception
- in case the test failspublic void testMultipleProjectCreationGalore() throws Exception
This displays an issue in the OpenCms v6 project driver, where a project is created with a UNIQUE INDEX based on the given name and the current system time. In rare instances the system time may be identical and an error occurs.
The issue was found in the MySQL project driver, but others DBs may be affected as well.
Exception
- in case the test failspublic void testPublishFolderWithChangedFileFromOtherProject() throws Throwable
Throwable
- if something goes wrongpublic void testPublishFolderWithDeletedFileFromOtherProject() throws Throwable
Throwable
- if something goes wrongpublic void testPublishFolderWithNewFileFromOtherProject() throws Throwable
Throwable
- if something goes wrongpublic void testPublishScenarioA() throws Throwable
This scenario is described as follows: We have users "test1" and "test2". We have two projects, "project1" and "project2". Project "project1" consists of the folder "/". Project "project2" consists of the folder "/folder1/subfolder11/". User "test2" edits the file "/folder1/subfolder11/index.html". After this, user "test1" locks the folder "/folder1" in "project1", and unlocks it again. User "test2" logs in and now publishes "project2".
Wanted result: the changed resource "/folder1/subfolder11/index.html" is published with "project2".
The test illustrates a change in the logic from OpenCms 5 to OpenCms 6: In OpenCms 5, locking a file caused it to switch to the current users project. In OpenCms 6, this is no longer true, at last not if you just lock a parent folder. So in OpenCms 5, this test would fail, since the resource would be in "project1", not "project2".
Throwable
- if something goes wrongpublic void testPublishScenarioB() throws Throwable
This scenario is described as follows: We have users "test1" and "test2" and projects "projectA" and "projectB". Both projects contain all resources. We have two folders "/foldera/" and "/folderb/". There is a resource "test.txt" that has a sibling in both folders. User "test1" locks folder "/foldera/" and user "test2" locks folder "/folderb". Now both users try to edit the sibling of "test.txt" in their folder.
TODO: How are concurrent file modifications avoided on the sibling?
Throwable
- if something goes wrongpublic void testPublishScenarioC() throws Throwable
This scenario is described as follows: Direct publishing of folders containing subfolders skips all changed subfolders e.g. direct publish of /folder1/ publishes /folder1/ and /folder1/index.html/, but not /folder1/subfolder11/.
Throwable
- if something goes wrongpublic void testPublishScenarioD() throws Throwable
This scenario is described as follows: Direct publishing of folders containing subfolders skips all (sibling) resources in subfolders. e.g. direct publish of /folder2/folder1/ publishes /folder2/folder1/ and /folder2/folder1/index.html/, but not /folder2/folder1/subfolder11/index.html.
Throwable
- if something goes wrongpublic void testPublishScenarioE() throws Throwable
This scenario is described as follows: Deletion of folders containing shared locked siblings, after copying a folder creating siblings into a new folder and publishing.
Throwable
- if something goes wrongpublic void testPublishScenarioF() throws Throwable
This scenario is described as follows: We have 2 siblings: sibA.txt and sibB.txt We set a shared property and we publish just one sibling let's say sibA.txt. After publishing both siblings should be unchanged
Throwable
- if something goes wrongpublic void testPublishScenarioG() throws Throwable
This scenario is described as follows: We have 2 siblings: sib1.txt and sib2.txt We do a content modification and we publish just one sibling let's say sib1.txt. After publishing both siblings should be unchanged
Throwable
- if something goes wrongpublic void testPublishScenarioH() throws Throwable
This scenario is described as follows: We have 2 unchanged siblings: sibX.txt and sibY.txt Now we set a different individual property on each sibling and we publish just one sibling let's say sibX.txt. After publishing only sibX.txt should be unchanged and sibY.txt should still be changed
Throwable
- if something goes wrong
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |