Updated all dependencies for M1 RELEASE
Updated to Spring Cloud Build 2.2.0.M1
This commit is contained in:
@@ -131,7 +131,7 @@ public class SimpleTaskAutoConfigurationTests {
|
||||
+ "Could not obtain sequence value; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: "
|
||||
+ "Syntax error in SQL statement \"SELECT FOOBARLESSSEQ.NEXTVAL FROM[*] DUAL \"; "
|
||||
+ "expected \"identifier\"; SQL statement:\n"
|
||||
+ "select foobarlessSEQ.nextval from dual [42001-199]",
|
||||
+ "select foobarlessSEQ.nextval from dual [42001-198]",
|
||||
applicationContextRunner);
|
||||
}
|
||||
|
||||
|
||||
@@ -58,6 +58,9 @@ public class TaskCoreTests {
|
||||
private static final String ERROR_MESSAGE = "errorMessage='java.lang.IllegalStateException: "
|
||||
+ "Failed to execute CommandLineRunner";
|
||||
|
||||
/**
|
||||
* Used to capture the log output from the test task.
|
||||
*/
|
||||
@Rule
|
||||
public OutputCapture outputCapture = new OutputCapture();
|
||||
|
||||
|
||||
@@ -62,6 +62,9 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
public class TaskLifecycleListenerTests {
|
||||
|
||||
/**
|
||||
* Used to capture the log output from the test task.
|
||||
*/
|
||||
@Rule
|
||||
public OutputCapture outputCapture = new OutputCapture();
|
||||
|
||||
|
||||
@@ -51,12 +51,24 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
@DirtiesContext
|
||||
public class TaskListenerExecutorObjectFactoryTests {
|
||||
|
||||
/**
|
||||
* Task name constant for the Before TaskListener tests.
|
||||
*/
|
||||
public static final String BEFORE_LISTENER = "BEFORE LISTENER";
|
||||
|
||||
/**
|
||||
* Task name constant for the After TaskListener tests.
|
||||
*/
|
||||
public static final String AFTER_LISTENER = "AFTER LISTENER";
|
||||
|
||||
/**
|
||||
* Task name constant for the Fail TaskListener tests.
|
||||
*/
|
||||
public static final String FAIL_LISTENER = "FAIL LISTENER";
|
||||
|
||||
/**
|
||||
* Collection of the task execution listeners that were fired.
|
||||
*/
|
||||
public static List<TaskExecution> taskExecutionListenerResults = new ArrayList<>(3);
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -65,6 +65,9 @@ public class SimpleTaskExplorerTests {
|
||||
|
||||
private final static String EXTERNAL_EXECUTION_ID = "123ABC";
|
||||
|
||||
/**
|
||||
* Establishes that a Exception is not expected.
|
||||
*/
|
||||
@Rule
|
||||
public ExpectedException expected = ExpectedException.none();
|
||||
|
||||
|
||||
@@ -43,6 +43,9 @@ import static org.mockito.Mockito.mock;
|
||||
*/
|
||||
public class TaskDatabaseInitializerTests {
|
||||
|
||||
/**
|
||||
* Establishes that a Exception is not expected.
|
||||
*/
|
||||
@Rule
|
||||
public ExpectedException expected = ExpectedException.none();
|
||||
|
||||
|
||||
@@ -28,7 +28,10 @@ import org.springframework.cloud.task.repository.TaskRepository;
|
||||
*
|
||||
* @author Glenn Renfro
|
||||
*/
|
||||
public class TaskExecutionCreator {
|
||||
public final class TaskExecutionCreator {
|
||||
|
||||
private TaskExecutionCreator() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a sample TaskExecution and stores it in the taskRepository.
|
||||
@@ -71,6 +74,7 @@ public class TaskExecutionCreator {
|
||||
/**
|
||||
* Updates a sample TaskExecution in the taskRepository.
|
||||
* @param taskRepository the taskRepository where the taskExecution should be updated.
|
||||
* @param expectedTaskExecution the expected task execution.
|
||||
* @return the taskExecution created.
|
||||
*/
|
||||
public static TaskExecution completeExecution(TaskRepository taskRepository,
|
||||
|
||||
@@ -52,7 +52,10 @@ import static org.mockito.Mockito.when;
|
||||
* @author Glenn Renfro
|
||||
* @author Ilayaperumal Gopinathan
|
||||
*/
|
||||
public class TestDBUtils {
|
||||
public final class TestDBUtils {
|
||||
|
||||
private TestDBUtils() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the TaskExecution from the datasource.
|
||||
|
||||
@@ -25,10 +25,19 @@ import org.springframework.cloud.task.repository.TaskExecution;
|
||||
*/
|
||||
public abstract class TestListener {
|
||||
|
||||
/**
|
||||
* Default end message to use for the start message.
|
||||
*/
|
||||
public static final String START_MESSAGE = "FOO";
|
||||
|
||||
/**
|
||||
* Default end message to use for the error message.
|
||||
*/
|
||||
public static final String ERROR_MESSAGE = "BAR";
|
||||
|
||||
/**
|
||||
* Default end message to use for the end message.
|
||||
*/
|
||||
public static final String END_MESSAGE = "BAZ";
|
||||
|
||||
protected boolean isTaskStartup;
|
||||
@@ -67,6 +76,7 @@ public abstract class TestListener {
|
||||
|
||||
/**
|
||||
* Task Execution that was updated during listener call.
|
||||
* @return instance of TaskExecution.
|
||||
*/
|
||||
public TaskExecution getTaskExecution() {
|
||||
return this.taskExecution;
|
||||
@@ -74,6 +84,7 @@ public abstract class TestListener {
|
||||
|
||||
/**
|
||||
* The throwable that was sent with the task if task failed.
|
||||
* @return instance of Throwable.
|
||||
*/
|
||||
public Throwable getThrowable() {
|
||||
return this.throwable;
|
||||
|
||||
@@ -42,10 +42,16 @@ import static org.mockito.Mockito.when;
|
||||
*
|
||||
* @author Glenn Renfro
|
||||
*/
|
||||
public class TestVerifierUtils {
|
||||
public final class TestVerifierUtils {
|
||||
|
||||
/**
|
||||
* The default number of arguments to use for the test TaskExecutions.
|
||||
*/
|
||||
public static final int ARG_SIZE = 5;
|
||||
|
||||
private TestVerifierUtils() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a mock {@link Appender} to be added to the root logger.
|
||||
* @return reference to the mock appender.
|
||||
@@ -78,7 +84,7 @@ public class TestVerifierUtils {
|
||||
|
||||
/**
|
||||
* Creates a fully populated TaskExecution (except args) for testing.
|
||||
* @return
|
||||
* @return instance of a TaskExecution
|
||||
*/
|
||||
public static TaskExecution createSampleTaskExecutionNoArg() {
|
||||
Random randomGenerator = new Random();
|
||||
@@ -92,7 +98,7 @@ public class TestVerifierUtils {
|
||||
|
||||
/**
|
||||
* Creates a fully populated TaskExecution (except args) for testing.
|
||||
* @return
|
||||
* @return instance of a TaskExecution.
|
||||
*/
|
||||
public static TaskExecution endSampleTaskExecutionNoArg() {
|
||||
Random randomGenerator = new Random();
|
||||
@@ -109,7 +115,8 @@ public class TestVerifierUtils {
|
||||
|
||||
/**
|
||||
* Creates a fully populated TaskExecution for testing.
|
||||
* @return
|
||||
* @param executionId the taskExecutionId to be created.
|
||||
* @return instance of the TaskExecution.
|
||||
*/
|
||||
public static TaskExecution createSampleTaskExecution(long executionId) {
|
||||
Date startTime = new Date();
|
||||
@@ -124,7 +131,7 @@ public class TestVerifierUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies that all the fields in between the expected and actual are the same;
|
||||
* Verifies that all the fields in between the expected and actual are the same.
|
||||
* @param expectedTaskExecution The expected value for the task execution.
|
||||
* @param actualTaskExecution The actual value for the task execution.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user