Updated tests to remove deprecated code from tests
* cleanup removing unused headers * Updated asserts in code base that needed messages (marked as deprecated) * left one test that was testing a deprecated constructor. When that code is removed we can remove that test. * some other cleanup resolves #338
This commit is contained in:
committed by
Michael Minella
parent
c4324b550d
commit
3ad9efe3fe
@@ -43,7 +43,6 @@ import org.springframework.cloud.deployer.resource.support.DelegatingResourceLoa
|
||||
import org.springframework.cloud.deployer.spi.task.TaskLauncher;
|
||||
import org.springframework.cloud.task.batch.partition.DeployerPartitionHandler;
|
||||
import org.springframework.cloud.task.batch.partition.DeployerStepExecutionHandler;
|
||||
import org.springframework.cloud.task.batch.partition.NoOpEnvironmentVariablesProvider;
|
||||
import org.springframework.cloud.task.batch.partition.PassThroughCommandLineArgsProvider;
|
||||
import org.springframework.cloud.task.batch.partition.SimpleEnvironmentVariablesProvider;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
|
||||
@@ -38,7 +38,6 @@ import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.datasource.DriverManagerDataSource;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.util.SocketUtils;
|
||||
|
||||
@@ -97,7 +96,7 @@ public class TaskPartitionerTests {
|
||||
"--spring.datasource.username=" + DATASOURCE_USER_NAME,
|
||||
"--spring.datasource.driverClassName=" + DATASOURCE_DRIVER_CLASS_NAME);
|
||||
|
||||
Page<TaskExecution> taskExecutions = taskExplorer.findAll(new PageRequest(0, 10));
|
||||
Page<TaskExecution> taskExecutions = taskExplorer.findAll(PageRequest.of(0, 10));
|
||||
assertEquals("Five rows are expected", 5, taskExecutions.getTotalElements());
|
||||
assertEquals("Only One master is expected", 1, taskExplorer.getTaskExecutionCountByTaskName("Partitioned Batch Job Task:master:0"));
|
||||
assertEquals("4 partitions is expected", 4, taskExplorer.getTaskExecutionCountByTaskName("Partitioned Batch Job Task:worker:0"));
|
||||
|
||||
Reference in New Issue
Block a user