@SpringBootTest(webEnvironment=NONE) @ContextConfiguration(classes=AbstractIntegrationTests.Config.class) public abstract class AbstractIntegrationTests extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AbstractIntegrationTests.Config |
protected static class |
AbstractIntegrationTests.SchedulerWrapper
A decorator for Scheduler that keeps track of scheduled/unscheduled tasks.
|
Modifier and Type | Field and Description |
---|---|
org.junit.rules.ExpectedException |
expectedException |
protected org.slf4j.Logger |
log |
protected org.springframework.cloud.deployer.resource.maven.MavenProperties |
mavenProperties |
org.junit.rules.TestName |
name |
Constructor and Description |
---|
AbstractIntegrationTests() |
Modifier and Type | Method and Description |
---|---|
protected abstract Map<String,String> |
getAppProperties()
To be implemented by subclasses, which should return the appProperties that
will be used for the tests.
|
protected abstract List<String> |
getCommandLineArgs()
To be implemented by subclasses, which should return the commandLineArgs that
will be used for the tests.
|
protected abstract Map<String,String> |
getDeploymentProperties()
To be implemented by subclasses, which should return the deploymentProperties that
will be used for the tests.
|
protected abstract Map<String,String> |
getSchedulerProperties()
To be implemented by subclasses, which should return the schedulerProperties that
will be used for the tests.
|
Timeout |
getScheduleTimeout() |
Timeout |
getUnScheduleTimeout() |
protected org.hamcrest.Matcher<ScheduleInfo> |
hasSpecifiedSchedule(List<ScheduleInfo> schedules,
String scheduleName)
A Hamcrest Matcher that queries the schedule list for a schedule name.
|
protected org.hamcrest.Matcher<ScheduleInfo> |
hasSpecifiedSchedulesByTaskDefinitionName(List<ScheduleInfo> schedules,
String taskDefinitionName,
int expectedScheduleCount)
A Hamcrest Matcher that queries the schedule list for a task definition name.
|
protected abstract Scheduler |
provideScheduler()
To be implemented by subclasses, which should return the instance of Scheduler that needs
to be tested.
|
protected String |
randomName() |
protected String |
scheduleName() |
void |
setScheduleTimeout(Timeout scheduleTimeout) |
void |
setUnScheduleTimeout(Timeout unScheduleTimeout) |
protected org.hamcrest.Matcher<ScheduleInfo> |
specifiedScheduleNotPresent(List<ScheduleInfo> schedules,
String scheduleName)
A Hamcrest Matcher that queries the schedule list for a definition name.
|
protected Scheduler |
taskScheduler()
Subclasses should call this method to interact with the Scheduler under test.
|
void |
tearDown() |
protected org.springframework.core.io.Resource |
testApplication()
Return a resource corresponding to the spring-cloud-deployer-spi-test-app app suitable for the target runtime.
|
void |
testDuplicateSchedule() |
void |
testInvalidCronExpression() |
void |
testListFilter() |
void |
testMultipleSchedule() |
void |
testSimpleSchedule() |
void |
testUnschedule() |
void |
testUnScheduleNoEntry() |
void |
wrapScheduler() |
@Autowired protected org.springframework.cloud.deployer.resource.maven.MavenProperties mavenProperties
protected final org.slf4j.Logger log
public org.junit.rules.TestName name
public org.junit.rules.ExpectedException expectedException
public void tearDown()
protected Scheduler taskScheduler()
provideScheduler()
, that keeps
track of which tasks have been scheduled and unscheduled.protected abstract Scheduler provideScheduler()
protected abstract List<String> getCommandLineArgs()
protected abstract Map<String,String> getSchedulerProperties()
protected abstract Map<String,String> getDeploymentProperties()
protected abstract Map<String,String> getAppProperties()
public void wrapScheduler()
public void testSimpleSchedule()
public void testUnschedule()
public void testDuplicateSchedule()
public void testUnScheduleNoEntry()
public void testInvalidCronExpression()
public void testMultipleSchedule()
public void testListFilter()
public Timeout getScheduleTimeout()
public void setScheduleTimeout(Timeout scheduleTimeout)
public Timeout getUnScheduleTimeout()
public void setUnScheduleTimeout(Timeout unScheduleTimeout)
protected String randomName()
protected String scheduleName()
protected org.hamcrest.Matcher<ScheduleInfo> hasSpecifiedSchedule(List<ScheduleInfo> schedules, String scheduleName)
protected org.hamcrest.Matcher<ScheduleInfo> hasSpecifiedSchedulesByTaskDefinitionName(List<ScheduleInfo> schedules, String taskDefinitionName, int expectedScheduleCount)
protected org.hamcrest.Matcher<ScheduleInfo> specifiedScheduleNotPresent(List<ScheduleInfo> schedules, String scheduleName)
protected org.springframework.core.io.Resource testApplication()
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.