Class StabilityServerSetupSnapshotRestoreTasks

java.lang.Object
org.wildfly.test.stabilitylevel.StabilityServerSetupSnapshotRestoreTasks
All Implemented Interfaces:
org.jboss.as.arquillian.api.ServerSetupTask
Direct Known Subclasses:
StabilityServerSetupSnapshotRestoreTasks.Community, StabilityServerSetupSnapshotRestoreTasks.Default, StabilityServerSetupSnapshotRestoreTasks.Experimental, StabilityServerSetupSnapshotRestoreTasks.Preview

public abstract class StabilityServerSetupSnapshotRestoreTasks extends Object implements org.jboss.as.arquillian.api.ServerSetupTask
For tests that need to run under a specific server stability level, the server setup tasks from the inner classes can be used to change the stability level of the server to the desired level. Once the test is done, the original stability level is restored. In order to not pollute the configuration with XML from a different stability level following the run of the test, it takes a snapshot of the server configuration in the setup() method, and then restores to that snapshot in the teardown() method
  • Constructor Details

    • StabilityServerSetupSnapshotRestoreTasks

      public StabilityServerSetupSnapshotRestoreTasks(org.jboss.as.version.Stability desiredStability)
  • Method Details

    • setup

      public final void setup(org.jboss.as.arquillian.container.ManagementClient managementClient, String containerId) throws Exception
      Specified by:
      setup in interface org.jboss.as.arquillian.api.ServerSetupTask
      Throws:
      Exception
    • doSetup

      protected void doSetup(org.jboss.as.arquillian.container.ManagementClient managementClient) throws Exception
      Throws:
      Exception
    • tearDown

      public final void tearDown(org.jboss.as.arquillian.container.ManagementClient managementClient, String containerId) throws Exception
      Specified by:
      tearDown in interface org.jboss.as.arquillian.api.ServerSetupTask
      Throws:
      Exception
    • tearDown

      public final void tearDown(org.jboss.as.arquillian.container.ManagementClient managementClient) throws Exception
      Throws:
      Exception