Interface Container

All Known Implementing Classes:
TomcatContainer

public interface Container
A single webapp container that can hold a running instance of JIRA.
  • Method Details

    • start

      void start()
      Start the instance.
    • stop

      void stop()
      Cleanly stop the instance.
    • jiraNode

      JiraCluster.Node jiraNode()
      Returns:
      the JIRA cluster node the instance is running. Use this for accessing REST endpoints, etc.
    • installWar

      void installWar(Path warFile, String context)
      Installs a WAR file into this container.
      Parameters:
      warFile - the WAR file to install.
      context - the context path. Do not include any leading or trailing '/' characters.
    • installJira

      void installJira(JiraType warType)
      Installs a predefined JIRA WAR into this container.
      Parameters:
      warType - the JIRA version to install.
    • getProduct

      JiraTestedProduct getProduct()
      Returns:
      The JiraTestedProduct for this node. Use this for accessing the page binder, web driver, environment data, etc.
    • getLocalHome

      Path getLocalHome()
      Returns:
      a path to the local home directory of JIRA
    • getClusterProperties

      ClusterNodeProperties getClusterProperties()
      Returns:
      The wrapped property file for this node (cluster.properties from jirahome).
    • waitForLogMessage

      void waitForLogMessage(org.hamcrest.Matcher<String> message, Duration timeout)
      Waits for a log message that matches the pattern. Mind that messages are accumulated from the start of container. If you want to wait from message from now on use waitForLogMessageFromNowOn(Matcher, Duration)
    • clearLogMessages

      void clearLogMessages()
      Clears all the log messages collected so far in the in-memory WatchingLogger.LogWatcher. Logs written out to a file remain intact.
    • waitForLogMessageFromNowOn

      void waitForLogMessageFromNowOn(org.hamcrest.Matcher<String> message, Duration timeout)
      Clears already accumulated log messages and waits for a log message that matches the pattern.
    • getSystemProperties

      Map<String,String> getSystemProperties()
      Returns:
      the system properties for the container. Can be modified.
      Since:
      7.3.5
    • generateThreadDump

      void generateThreadDump()
      Generate a thread dump of this process to the logs.
      Since:
      7.3.5
    • waitForContainerToDie

      void waitForContainerToDie() throws TimeoutException
      Wait until container will die
      Throws:
      TimeoutException - if container will not die
      Since:
      8.11
    • addXmlReplacement

      void addXmlReplacement(org.codehaus.cargo.util.XmlReplacement xmlReplacement)
      Replaces values in xml files of the container
      Parameters:
      xmlReplacement - containing replacement data
      Since:
      8.21
    • getFreshDbConfig

      void getFreshDbConfig() throws IOException
      Remove the dbconfig.xml file if exists and copy a fresh one to home
      Throws:
      IOException
      Since:
      10.2