Interface ContainerSet<T extends Container>
- Type Parameters:
T- the container type.
- All Known Subinterfaces:
ContainerRule<T>
- All Known Implementing Classes:
TomcatContainerSet
public interface ContainerSet<T extends Container>
A set of webapp containers that can potentially run a JIRA cluster.
-
Method Summary
Modifier and TypeMethodDescriptionvoidRemove all Jira tables.cluster()Access an object that can perform operations on the JIRA cluster.voidinstallJira(JiraType warType) Installs a predefined JIRA WAR into all containers in the set.voidinstallSharedPlugin(Path pluginFile) Installs a plugin into shared home.voidinstallTestingPlugins(JiraType jiraType) Installs any plugins to shared home that are required for testing.voidinstallWar(Path warFile, String context) Installs a WAR file into all containers in the set.jiraWarFile(JiraType warType) Return the path of a predefined JIRA WAR file.voidReinsert the basic Jira tables, so that Jira is initialised, licensed, but without any issues.voidDeprecated.voidDeprecated.voidsetLicenseOnDatabase(String licence) Sets licence on database (should be run before container(s) start).voidsetSharedHome(Path path) Sets path to shared home.voidstartAll()Start all containers in the set.voidvoidvoidstopAll()Cleanly stop all containers in the set.testingPluginFile(String name, JiraType jarType) Return the path to the plugin JAR file.voidWaits for a default maximum amount of time for all containers that are starting to complete startup and join the cluster.voidwaitForStartupOfActiveContainers(Duration timeout) Waits at most the specified amount of time for all containers to finish starting up and join the cluster.voidwaitForUpgradeState(ZeroDowntimeControl.UpgradeState targetState, Duration timeout)
-
Method Details
-
startAll
void startAll()Start all containers in the set. -
startAllConcurrently
- Throws:
InterruptedException
-
startStoppedContainersConcurrently
- Throws:
InterruptedException
-
stopAll
void stopAll()Cleanly stop all containers in the set. -
getContainers
- Returns:
- all containers in the set.
-
cluster
JiraCluster cluster()Access an object that can perform operations on the JIRA cluster. Access REST endpoints through this.- Returns:
- object that can perform JIRA cluster operations.
-
installJira
Installs a predefined JIRA WAR into all containers in the set.- Parameters:
warType- the JIRA version to install.
-
jiraWarFile
Return the path of a predefined JIRA WAR file. File may not actually exist.- Parameters:
warType- JIRA version.- Returns:
- the path of the WAR file.
-
testingPluginFile
Return the path to the plugin JAR file.- Parameters:
name- the name of the plugin. For example,"jira-ha-plugin"will search for a file called"jira-ha-plugin-.*.jar".jarType- JIRA version.- Returns:
- the path of the JAR file.
-
installWar
Installs a WAR file into all containers in the set.- Parameters:
warFile- the WAR file to install.context- the context path. Do not include any leading or trailing '/' characters.
-
installTestingPlugins
Installs any plugins to shared home that are required for testing. These plugins are the func-test plugin, ha plugin, etc.- Parameters:
jiraType- JIRA version to target.
-
resetClusterState
Deprecated.No-op. This empty method is left not to break 8.13 -> 8.14 merge. -
cleanDatabase
void cleanDatabase()Remove all Jira tables. We're doing this rather than dropping the whole DB, because database drop requires superuser permissions. -
reinitialiseDatabase
void reinitialiseDatabase()Reinsert the basic Jira tables, so that Jira is initialised, licensed, but without any issues. -
resetDatabase
Deprecated.No-op. This empty method is left not to break 8.13 -> 8.14 merge. -
setLicenseOnDatabase
Sets licence on database (should be run before container(s) start). -
waitForUpgradeState
-
waitForStartupOfActiveContainers
Waits at most the specified amount of time for all containers to finish starting up and join the cluster.- Parameters:
timeout- the maximum amount of time to wait.
-
waitForStartupOfActiveContainers
void waitForStartupOfActiveContainers()Waits for a default maximum amount of time for all containers that are starting to complete startup and join the cluster.
-