|
|
|
|
@ -517,6 +517,13 @@ class BatchAutoConfigurationTests {
@@ -517,6 +517,13 @@ class BatchAutoConfigurationTests {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void defaultJobRepositoryIsNotCreatedWhenUserDefinedJobRepositoryBean() { |
|
|
|
|
this.contextRunner |
|
|
|
|
.withUserConfiguration(TestConfigurationWithJobRepository.class, EmbeddedDataSourceConfiguration.class) |
|
|
|
|
.run((context) -> assertThat(context).hasSingleBean(TestJobRepository.class)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JobLauncherApplicationRunner createInstance(String... registeredJobNames) { |
|
|
|
|
JobLauncherApplicationRunner runner = new JobLauncherApplicationRunner(mock(JobLauncher.class), |
|
|
|
|
mock(JobExplorer.class), mock(JobRepository.class)); |
|
|
|
|
@ -596,6 +603,16 @@ class BatchAutoConfigurationTests {
@@ -596,6 +603,16 @@ class BatchAutoConfigurationTests {
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@TestAutoConfigurationPackage(City.class) |
|
|
|
|
static class TestConfigurationWithJobRepository { |
|
|
|
|
|
|
|
|
|
@Bean |
|
|
|
|
TestJobRepository jobRepository() { |
|
|
|
|
return mock(TestJobRepository.class); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Configuration(proxyBeanMethods = false) |
|
|
|
|
static class EntityManagerFactoryConfiguration { |
|
|
|
|
|
|
|
|
|
@ -880,4 +897,8 @@ class BatchAutoConfigurationTests {
@@ -880,4 +897,8 @@ class BatchAutoConfigurationTests {
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
interface TestJobRepository extends JobRepository { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|