Class ServerStateManager


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

      • 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.

      • 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.

      • createTestData

        public void createTestData​(boolean autoCreateTestUsers)