Package com.atlassian.confluence.it
Class ServerStateManager
java.lang.Object
com.atlassian.confluence.it.ServerStateManager
High-level manager for manipulating server state before and after acceptance tests.
- Since:
- 4.2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.void
createTestData
(boolean autoCreateTestUsers) static boolean
Label the instance as broken, so that future tests can Skip fast.void
Removes all test data, including users, groups, permission, spaces and content.void
Pauses either all jobs, or a subset of jobs, to stop them interfering with test-running, particularly subsequent calls topauseJobsAndRemoveTestData()
orresetTestData(boolean)
.void
Removes all test data, including users, groups, permission, spaces and content.void
Deprecated.since 7.9 because it is misleadingly named.void
Deprecated.since 5.6 UseresetTestData(boolean)
to be explicit about auto-test-user creation.void
resetTestData
(boolean autoCreateTestUsers) Resets all test data, including users, groups, permission, spaces, content, etc, to a stable state.static void
Label the instance as broken, so that future tests can Skip fast.void
We need to wait for plugin upgrade tasks to complete before removing test data as it can break things.
-
Constructor Details
-
ServerStateManager
-
-
Method Details
-
getUserHelper
-
getDirectoryConfiguration
-
resetTestData
Deprecated.since 5.6 UseresetTestData(boolean)
to be explicit about auto-test-user creation. -
resetTestData
public void resetTestData(boolean autoCreateTestUsers) Resets all test data, including users, groups, permission, spaces, content, etc, to a stable state.Called from every test setUp.
-
skipFurtherTests
public static void skipFurtherTests()Label the instance as broken, so that future tests can Skip fast. -
isInstanceOk
public static boolean isInstanceOk()Label the instance as broken, so that future tests can Skip fast. -
waitForUpgradeTasks
public void waitForUpgradeTasks()We need to wait for plugin upgrade tasks to complete before removing test data as it can break things. Plugin builds which usually run upgrade tasks on test data can start running tests even before the upgrade tasks have finished. -
pauseJobsAndRemoveTestData
public void pauseJobsAndRemoveTestData()Removes all test data, including users, groups, permission, spaces and content.If possible, call
resetTestData(boolean)
instead to create common data at the same time. -
removeTestData
Deprecated.since 7.9 because it is misleadingly named. UsepauseJobsAndRemoveTestData()
, oronlyRemoveTestData()
.Removes all test data, including users, groups, permission, spaces and content.If possible, call
resetTestData(boolean)
instead to create common data at the same time. -
onlyRemoveTestData
public void onlyRemoveTestData()Removes all test data, including users, groups, permission, spaces and content.If possible, call
resetTestData(boolean)
instead to create common data at the same time. -
pauseJobs
public void pauseJobs()Pauses either all jobs, or a subset of jobs, to stop them interfering with test-running, particularly subsequent calls topauseJobsAndRemoveTestData()
orresetTestData(boolean)
. -
createTestData
Deprecated.Since 5.6 UsecreateTestData(boolean)
to be explicit about test user creation. -
createTestData
public void createTestData(boolean autoCreateTestUsers)
-
createTestData(boolean)
to be explicit about test user creation.