Class ServerStateManager

java.lang.Object
com.atlassian.confluence.it.ServerStateManager

public class ServerStateManager extends Object
High-level manager for manipulating server state before and after acceptance tests.
Since:
4.2
  • Constructor Details

  • Method Details

    • getUserHelper

      public UserManagementHelper getUserHelper()
    • getDirectoryConfiguration

      public DirectoryConfiguration getDirectoryConfiguration()
    • resetTestData

      @Deprecated public void resetTestData()
      Deprecated.
      since 5.6 Use resetTestData(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 public void removeTestData()
      Deprecated.
      since 7.9 because it is misleadingly named. Use pauseJobsAndRemoveTestData(), or 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.

    • 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 to pauseJobsAndRemoveTestData() or resetTestData(boolean).
    • createTestData

      @Deprecated public void createTestData()
      Deprecated.
      Since 5.6 Use createTestData(boolean) to be explicit about test user creation.
    • createTestData

      public void createTestData(boolean autoCreateTestUsers)