Remove unnecessary JobOperator bean definition
See gh-38325
This commit is contained in:
committed by
Moritz Halbritter
parent
1022e1bdd2
commit
e41b36273f
@@ -41,6 +41,7 @@ import org.springframework.batch.core.configuration.support.JobRegistryBeanPostP
|
||||
import org.springframework.batch.core.explore.JobExplorer;
|
||||
import org.springframework.batch.core.job.AbstractJob;
|
||||
import org.springframework.batch.core.launch.JobLauncher;
|
||||
import org.springframework.batch.core.launch.JobOperator;
|
||||
import org.springframework.batch.core.repository.JobRepository;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -105,8 +106,11 @@ class BatchAutoConfigurationTests {
|
||||
this.contextRunner.withInitializer(ConditionEvaluationReportLoggingListener.forLogLevel(LogLevel.INFO))
|
||||
.withUserConfiguration(TestConfiguration.class, EmbeddedDataSourceConfiguration.class)
|
||||
.run((context) -> {
|
||||
assertThat(context).hasSingleBean(JobRepository.class);
|
||||
assertThat(context).hasSingleBean(JobLauncher.class);
|
||||
assertThat(context).hasSingleBean(JobExplorer.class);
|
||||
assertThat(context).hasSingleBean(JobRegistry.class);
|
||||
assertThat(context).hasSingleBean(JobOperator.class);
|
||||
assertThat(context.getBean(BatchProperties.class).getJdbc().getInitializeSchema())
|
||||
.isEqualTo(DatabaseInitializationMode.EMBEDDED);
|
||||
assertThat(new JdbcTemplate(context.getBean(DataSource.class))
|
||||
|
||||
Reference in New Issue
Block a user