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:
Glenn Renfro
2018-01-05 09:30:26 -05:00
committed by Michael Minella
parent c4324b550d
commit 3ad9efe3fe
25 changed files with 36 additions and 46 deletions

View File

@@ -55,7 +55,6 @@ import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.util.SocketUtils;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -139,7 +138,7 @@ public class TaskStartTests {
getTaskApplication(1).run(new String[0]);
assertTrue(waitForDBToBePopulated());
Page<TaskExecution> taskExecutions = taskExplorer.findAll(new PageRequest(0, 10));
Page<TaskExecution> taskExecutions = taskExplorer.findAll(PageRequest.of(0, 10));
TaskExecution te = taskExecutions.iterator().next();
assertEquals("Only one row is expected", 1, taskExecutions.getTotalElements());
assertEquals("return code should be 0", 0, taskExecutions.iterator().next().getExitCode().intValue());
@@ -155,7 +154,7 @@ public class TaskStartTests {
getTaskApplication(1).run(new String[0]);
assertTrue(waitForDBToBePopulated());
Page<TaskExecution> taskExecutions = taskExplorer.findAll(new PageRequest(0, 10));
Page<TaskExecution> taskExecutions = taskExplorer.findAll(PageRequest.of(0, 10));
TaskExecution te = taskExecutions.iterator().next();
assertEquals("Only one row is expected", 1, taskExecutions.getTotalElements());
assertEquals("return code should be 0", 0, taskExecutions.iterator().next().getExitCode().intValue());

View File

@@ -139,7 +139,7 @@ public class TaskLauncherSinkTests {
launchTask(URL);
assertTrue(waitForDBToBePopulated());
Page<TaskExecution> taskExecutions = taskExplorer.findAll(new PageRequest(0, 10));
Page<TaskExecution> taskExecutions = taskExplorer.findAll(PageRequest.of(0, 10));
TaskExecution te = taskExecutions.iterator().next();
assertEquals("Only one row is expected", 1, taskExecutions.getTotalElements());
assertEquals("return code should be 0", 0, taskExecutions.iterator().next().getExitCode().intValue());

View File

@@ -27,7 +27,6 @@ import org.junit.After;
import org.junit.ClassRule;
import org.junit.Test;
import org.springframework.batch.core.scope.context.ChunkContext;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;