Class JiraCluster

java.lang.Object
com.atlassian.jira.plugins.ha.testapi.test.JiraCluster

public class JiraCluster extends Object
A set of nodes that run as part of a JIRA cluster for testing.
  • Constructor Details

  • Method Details

    • anyNode

      public JiraCluster.Node anyNode()
      Returns:
      a random node in the cluster.
    • differentNode

      public JiraCluster.Node differentNode(JiraCluster.Node than)
      Returns:
      returns a node guaranteed to be different than the specified node.
    • nodes

      public Collection<? extends JiraCluster.Node> nodes()
    • cleaner

      public ClusterCleaner cleaner()
    • adminUsername

      public String adminUsername()
    • adminPassword

      public String adminPassword()
    • waitForSync

      public void waitForSync(long time, TimeUnit timeUnit)
      Waits until all nodes in the cluster have synchronized their indexes and there are no pending inter-node operations. Fails with an exception if nodes haven't synchronized after the specified time.
    • waitForSync

      public void waitForSync()
      Waits until all nodes in the cluster have synchronized their indexes and there are no pending inter-node operations. Fails with an exception if nodes haven't synchronized up after 60 seconds.
    • waitForNodeSync

      public void waitForNodeSync(JiraCluster.Node n)
    • waitForNodeSync

      public void waitForNodeSync(JiraCluster.Node node, long time, TimeUnit timeUnit)
      Waits until node in the cluster has synchronized its indexes and there are no pending inter-node operations. Fails with an exception if the node haven't synchronized after the specified time.
    • waitForStartup

      public void waitForStartup(long time, TimeUnit timeUnit)
      Waits for all cluster nodes to be fully started up, throwing an error if it takes longer than the specified time.
    • waitForStartup

      public void waitForStartup()
      Waits for all cluster nodes ot be fully started up, throwing an error if it takes longer than 5 minutes.
    • toString

      public String toString()
      Overrides:
      toString in class Object