Updated Deployer Version to 2.8

Reactivated tests for rempote partition
This commit is contained in:
Glenn Renfro
2022-03-11 09:57:50 -05:00
parent 270b24be8b
commit 40b9840506
4 changed files with 25 additions and 25 deletions

View File

@@ -90,27 +90,27 @@ public class TaskPartitionerTests {
@Test
public void testWithLocalDeployer() throws Exception {
// SpringApplication app = new SpringApplication(PartitionedBatchJobApplication.class);
// app.setAdditionalProfiles("master");
// Properties properties = new Properties();
// properties.setProperty("spring.datasource.url", DATASOURCE_URL);
// properties.setProperty("spring.datasource.username", DATASOURCE_USER_NAME);
// properties.setProperty("spring.datasource.driverClassName", DATASOURCE_DRIVER_CLASS_NAME);
// properties.setProperty("spring.cloud.deployer.local.use-spring-application-json", "false");
// app.setDefaultProperties(properties);
// app.run();
//
// Page<TaskExecution> taskExecutions = this.taskExplorer
// .findAll(PageRequest.of(0, 10));
// assertThat(taskExecutions.getTotalElements()).as("Five rows are expected")
// .isEqualTo(5);
// assertThat(this.taskExplorer
// .getTaskExecutionCountByTaskName("PartitionedBatchJobTask"))
// .as("Only One master is expected").isEqualTo(1);
// for (TaskExecution taskExecution : taskExecutions) {
// assertThat(taskExecution.getExitCode()
// .intValue()).as("return code should be 0").isEqualTo(0);
// }
SpringApplication app = new SpringApplication(PartitionedBatchJobApplication.class);
app.setAdditionalProfiles("master");
Properties properties = new Properties();
properties.setProperty("spring.datasource.url", DATASOURCE_URL);
properties.setProperty("spring.datasource.username", DATASOURCE_USER_NAME);
properties.setProperty("spring.datasource.driverClassName", DATASOURCE_DRIVER_CLASS_NAME);
properties.setProperty("spring.cloud.deployer.local.use-spring-application-json", "false");
app.setDefaultProperties(properties);
app.run();
Page<TaskExecution> taskExecutions = this.taskExplorer
.findAll(PageRequest.of(0, 10));
assertThat(taskExecutions.getTotalElements()).as("Five rows are expected")
.isEqualTo(5);
assertThat(this.taskExplorer
.getTaskExecutionCountByTaskName("PartitionedBatchJobTask"))
.as("Only One master is expected").isEqualTo(1);
for (TaskExecution taskExecution : taskExecutions) {
assertThat(taskExecution.getExitCode()
.intValue()).as("return code should be 0").isEqualTo(0);
}
}
@Configuration(proxyBeanMethods = false)