public abstract class AbstractTaskLauncherIntegrationTests extends AbstractIntegrationTests
TaskLauncher
implementations.
Inheritors should setup an environment with a newly created
TaskLauncher
.
Tests in this class are independent and leave the
launcher in a clean state after they successfully run.
As deploying a task is often quite time consuming, some tests assert various aspects of deployment in a row, to avoid re-deploying apps over and over again.
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractTaskLauncherIntegrationTests.TaskLauncherWrapper
A decorator for TaskLauncher that keeps track of deployed/undeployed apps.
|
AbstractIntegrationTests.Config
log, mavenProperties, name
Constructor and Description |
---|
AbstractTaskLauncherIntegrationTests() |
Modifier and Type | Method and Description |
---|---|
void |
cleanupLingeringApps() |
protected org.hamcrest.Matcher<String> |
hasStatusThat(org.hamcrest.Matcher<TaskStatus> statusMatcher)
A Hamcrest Matcher that queries the deployment status for some task id.
|
protected abstract TaskLauncher |
provideTaskLauncher()
To be implemented by subclasses, which should return the instance of TaskLauncher that needs
to be tested.
|
protected TaskLauncher |
taskLauncher()
Subclasses should call this method to interact with the AppDeployer under test.
|
void |
testCommandLineArgs()
Tests that command line args can be passed in.
|
void |
testEnvironmentInfo()
Tests support for DeployerEnvironmentInfo is implemented.
|
void |
testErrorExit() |
void |
testNonExistentAppsStatus() |
void |
testReLaunch() |
void |
testSimpleCancel() |
void |
testSimpleLaunch() |
void |
wrapDeployer() |
deploymentTimeout, randomName, redeploymentPause, testApplication, undeploymentTimeout
public AbstractTaskLauncherIntegrationTests()
protected abstract TaskLauncher provideTaskLauncher()
taskLauncher()
, and not directly via a field or a call
to this method.protected TaskLauncher taskLauncher()
provideTaskLauncher()
, that keeps
track of which apps have been deployed and undeployed.public void wrapDeployer()
public void cleanupLingeringApps()
public void testNonExistentAppsStatus()
public void testSimpleLaunch() throws InterruptedException
InterruptedException
public void testReLaunch() throws InterruptedException
InterruptedException
public void testErrorExit() throws InterruptedException
InterruptedException
public void testSimpleCancel() throws InterruptedException
InterruptedException
public void testCommandLineArgs()
public void testEnvironmentInfo()
protected org.hamcrest.Matcher<String> hasStatusThat(org.hamcrest.Matcher<TaskStatus> statusMatcher)
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.