diff --git a/pom.xml b/pom.xml
index 2a4de1e4..2b2ef2cc 100755
--- a/pom.xml
+++ b/pom.xml
@@ -71,8 +71,8 @@
spring-cloud-task-batch
spring-cloud-task-stream
spring-cloud-task-starter
- spring-cloud-task-integration-tests
spring-cloud-task-samples
+ spring-cloud-task-integration-tests
diff --git a/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/listener/TaskLifecycleListener.java b/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/listener/TaskLifecycleListener.java
index 42c2694a..1a9d9f1a 100644
--- a/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/listener/TaskLifecycleListener.java
+++ b/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/listener/TaskLifecycleListener.java
@@ -156,7 +156,7 @@ public class TaskLifecycleListener implements ApplicationListener arguments) {
+ String exitMessage, List arguments,
+ String errorMessage) {
Assert.notNull(arguments, "arguments must not be null");
Assert.notNull(startTime, "startTime must not be null");
@@ -81,6 +90,7 @@ public class TaskExecution {
this.arguments = new ArrayList<>(arguments);
this.startTime = (Date)startTime.clone();
this.endTime = (endTime != null) ? (Date)endTime.clone() : null;
+ this.errorMessage = errorMessage;
}
public long getExecutionId() {
@@ -135,6 +145,14 @@ public class TaskExecution {
this.arguments = new ArrayList<> (arguments);
}
+ public String getErrorMessage() {
+ return errorMessage;
+ }
+
+ public void setErrorMessage(String errorMessage) {
+ this.errorMessage = errorMessage;
+ }
+
@Override
public String toString() {
return "TaskExecution{" +
@@ -144,6 +162,7 @@ public class TaskExecution {
", startTime=" + startTime +
", endTime=" + endTime +
", exitMessage='" + exitMessage + '\'' +
+ ", errorMessage='" + errorMessage + "\'" +
", arguments=" + arguments +
'}';
}
diff --git a/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/TaskRepository.java b/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/TaskRepository.java
index 4755ca13..d929629a 100644
--- a/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/TaskRepository.java
+++ b/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/TaskRepository.java
@@ -42,6 +42,20 @@ public interface TaskRepository {
TaskExecution completeTaskExecution(long executionId, Integer exitCode, Date endTime,
String exitMessage);
+ /**
+ * Notifies the repository that a taskExecution has completed.
+ *
+ * @param executionId to the task execution to be updated.
+ * @param exitCode to be stored for this task.
+ * @param endTime designated when the task completed.
+ * @param exitMessage to be stored for the task.
+ * @return the updated {@link TaskExecution}
+ * @since 1.1.0
+ */
+ @Transactional
+ TaskExecution completeTaskExecution(long executionId, Integer exitCode, Date endTime,
+ String exitMessage, String errorMessage);
+
/**
* Notifies the repository that a taskExecution needs to be created.
*
diff --git a/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/dao/JdbcTaskExecutionDao.java b/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/dao/JdbcTaskExecutionDao.java
index 70fb190d..0fcabcd8 100644
--- a/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/dao/JdbcTaskExecutionDao.java
+++ b/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/dao/JdbcTaskExecutionDao.java
@@ -58,7 +58,7 @@ public class JdbcTaskExecutionDao implements TaskExecutionDao {
public static final String SELECT_CLAUSE = "TASK_EXECUTION_ID, "
+ "START_TIME, END_TIME, TASK_NAME, EXIT_CODE, "
- + "EXIT_MESSAGE, LAST_UPDATED ";
+ + "EXIT_MESSAGE, ERROR_MESSAGE, LAST_UPDATED ";
public static final String FROM_CLAUSE = "%PREFIX%EXECUTION";
@@ -78,12 +78,12 @@ public class JdbcTaskExecutionDao implements TaskExecutionDao {
+ "%PREFIX%EXECUTION WHERE TASK_EXECUTION_ID = ?";
private static final String UPDATE_TASK_EXECUTION = "UPDATE %PREFIX%EXECUTION set "
- + "END_TIME = ?, EXIT_CODE = ?, EXIT_MESSAGE = ?, LAST_UPDATED = ? "
- + "where TASK_EXECUTION_ID = ?";
+ + "END_TIME = ?, EXIT_CODE = ?, EXIT_MESSAGE = ?, ERROR_MESSAGE = ?, "
+ + "LAST_UPDATED = ? where TASK_EXECUTION_ID = ?";
private static final String GET_EXECUTION_BY_ID = "SELECT TASK_EXECUTION_ID, " +
"START_TIME, END_TIME, TASK_NAME, EXIT_CODE, "
- + "EXIT_MESSAGE, LAST_UPDATED "
+ + "EXIT_MESSAGE, ERROR_MESSAGE, LAST_UPDATED "
+ "from %PREFIX%EXECUTION where TASK_EXECUTION_ID = ?";
private static final String FIND_ARGUMENT_FROM_ID = "SELECT TASK_EXECUTION_ID, "
@@ -129,7 +129,7 @@ public class JdbcTaskExecutionDao implements TaskExecutionDao {
Date startTime, List arguments) {
long taskExecutionId = getNextExecutionId();
TaskExecution taskExecution = new TaskExecution(taskExecutionId, null, taskName,
- startTime, null, null, arguments);
+ startTime, null, null, arguments, null);
Object[] queryParameters = new Object[]{ taskExecutionId, startTime, taskName, new Date()};
jdbcTemplate.update(
@@ -142,7 +142,7 @@ public class JdbcTaskExecutionDao implements TaskExecutionDao {
@Override
public void completeTaskExecution(long taskExecutionId, Integer exitCode, Date endTime,
- String exitMessage) {
+ String exitMessage, String errorMessage) {
// Check if given TaskExecution's Id already exists, if none is found
// it is invalid and an exception should be thrown.
if (jdbcTemplate.queryForObject(getQuery(CHECK_TASK_EXECUTION_EXISTS), Integer.class,
@@ -150,15 +150,21 @@ public class JdbcTaskExecutionDao implements TaskExecutionDao {
throw new IllegalStateException("Invalid TaskExecution, ID " + taskExecutionId + " not found.");
}
- Object[] parameters = new Object[]{ endTime, exitCode, exitMessage, new Date(),
+ Object[] parameters = new Object[]{ endTime, exitCode, exitMessage, errorMessage, new Date(),
taskExecutionId};
jdbcTemplate.update(
getQuery(UPDATE_TASK_EXECUTION),
parameters,
- new int[]{ Types.TIMESTAMP, Types.INTEGER, Types.VARCHAR, Types.TIMESTAMP,
+ new int[]{ Types.TIMESTAMP, Types.INTEGER, Types.VARCHAR, Types.VARCHAR, Types.TIMESTAMP,
Types.BIGINT});
}
+ @Override
+ public void completeTaskExecution(long taskExecutionId, Integer exitCode, Date endTime,
+ String exitMessage) {
+ completeTaskExecution(taskExecutionId, exitCode, endTime, exitMessage, null);
+ }
+
/**
* Public setter for the table prefix property. This will be prefixed to all
* the table names before queries are executed. Defaults to
@@ -374,7 +380,8 @@ public class JdbcTaskExecutionDao implements TaskExecutionDao {
rs.getTimestamp("START_TIME"),
rs.getTimestamp("END_TIME"),
rs.getString("EXIT_MESSAGE"),
- getTaskArguments(id));
+ getTaskArguments(id),
+ rs.getString("ERROR_MESSAGE"));
}
private Integer getNullableExitCode(ResultSet rs) throws SQLException {
diff --git a/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/dao/MapTaskExecutionDao.java b/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/dao/MapTaskExecutionDao.java
index b9405c17..fb9bf276 100644
--- a/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/dao/MapTaskExecutionDao.java
+++ b/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/dao/MapTaskExecutionDao.java
@@ -56,17 +56,23 @@ public class MapTaskExecutionDao implements TaskExecutionDao {
Date startTime, List arguments) {
long taskExecutionId = getNextExecutionId();
TaskExecution taskExecution = new TaskExecution(taskExecutionId, null, taskName,
- startTime, null, null, arguments);
+ startTime, null, null, arguments, null);
taskExecutions.put(taskExecutionId, taskExecution);
return taskExecution;
}
@Override
- public void completeTaskExecution(long executionId, Integer exitCode, Date endTime, String exitMessage) {
+ public void completeTaskExecution(long executionId, Integer exitCode, Date endTime, String exitMessage, String errorMessage) {
TaskExecution taskExecution= taskExecutions.get(executionId);
taskExecution.setEndTime(endTime);
taskExecution.setExitCode(exitCode);
taskExecution.setExitMessage(exitMessage);
+ taskExecution.setErrorMessage(errorMessage);
+ }
+
+ @Override
+ public void completeTaskExecution(long executionId, Integer exitCode, Date endTime, String exitMessage) {
+ completeTaskExecution(executionId, exitCode, endTime, exitMessage, null);
}
@Override
diff --git a/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/dao/TaskExecutionDao.java b/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/dao/TaskExecutionDao.java
index 91f2c1a8..c162040c 100644
--- a/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/dao/TaskExecutionDao.java
+++ b/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/dao/TaskExecutionDao.java
@@ -42,6 +42,18 @@ public interface TaskExecutionDao {
TaskExecution createTaskExecution( String taskName,
Date startTime, List arguments);
+ /**
+ * Update and existing {@link TaskExecution}.
+ *
+ * @param executionId the id of the taskExecution to be updated.
+ * @param exitCode the status of the task upon completion.
+ * @param endTime the time the task completed.
+ * @param exitMessage the message assigned to the task upon completion.
+ * @param errorMessage error information available upon failure of a task.
+ * @since 1.1.0
+ */
+ void completeTaskExecution(long executionId, Integer exitCode, Date endTime, String exitMessage, String errorMessage);
+
/**
* Update and existing {@link TaskExecution}.
*
diff --git a/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/support/SimpleTaskRepository.java b/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/support/SimpleTaskRepository.java
index d706a1b4..ee1b6934 100644
--- a/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/support/SimpleTaskRepository.java
+++ b/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/support/SimpleTaskRepository.java
@@ -51,19 +51,25 @@ public class SimpleTaskRepository implements TaskRepository {
this.taskExecutionDaoFactoryBean = taskExecutionDaoFactoryBean;
}
+ @Override
+ public TaskExecution completeTaskExecution(long executionId, Integer exitCode, Date endTime, String exitMessage) {
+ return completeTaskExecution(executionId, exitCode, endTime, exitMessage, null);
+ }
+
@Override
public TaskExecution completeTaskExecution(long executionId, Integer exitCode, Date endTime,
- String exitMessage) {
+ String exitMessage, String errorMessage) {
initialize();
validateExitInformation(executionId, exitCode, endTime);
exitMessage = trimExitMessage(exitMessage);
- taskExecutionDao.completeTaskExecution(executionId, exitCode, endTime, exitMessage);
+ taskExecutionDao.completeTaskExecution(executionId, exitCode, endTime, exitMessage, errorMessage);
logger.debug("Updating: TaskExecution with executionId="+executionId
+ " with the following {"
+ "exitCode=" + exitCode
+ ", endTime=" + endTime
+ ", exitMessage='" + exitMessage + '\''
+ + ", errorMessage='" + errorMessage + '\''
+ '}');
return taskExecutionDao.getTaskExecution(executionId);
diff --git a/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-h2.sql b/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-h2.sql
index 06cc6fb0..de1c01d1 100644
--- a/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-h2.sql
+++ b/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-h2.sql
@@ -6,6 +6,7 @@ CREATE TABLE TASK_EXECUTION (
TASK_NAME VARCHAR(100) ,
EXIT_CODE INTEGER ,
EXIT_MESSAGE VARCHAR(2500) ,
+ ERROR_MESSAGE VARCHAR(2500) ,
LAST_UPDATED TIMESTAMP
);
diff --git a/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-hsqldb.sql b/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-hsqldb.sql
index 76eba155..50a91ae8 100644
--- a/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-hsqldb.sql
+++ b/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-hsqldb.sql
@@ -6,6 +6,7 @@ CREATE TABLE TASK_EXECUTION (
TASK_NAME VARCHAR(100) ,
EXIT_CODE INTEGER ,
EXIT_MESSAGE VARCHAR(2500) ,
+ ERROR_MESSAGE VARCHAR(2500) ,
LAST_UPDATED TIMESTAMP
);
diff --git a/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-mysql.sql b/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-mysql.sql
index 80e13af4..4f056b88 100644
--- a/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-mysql.sql
+++ b/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-mysql.sql
@@ -6,6 +6,7 @@ CREATE TABLE TASK_EXECUTION (
TASK_NAME VARCHAR(100) ,
EXIT_CODE INTEGER ,
EXIT_MESSAGE VARCHAR(2500) ,
+ ERROR_MESSAGE VARCHAR(2500) ,
LAST_UPDATED TIMESTAMP
) ENGINE=InnoDB;
diff --git a/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-oracle10g.sql b/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-oracle10g.sql
index f98cfa57..0a188dcc 100644
--- a/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-oracle10g.sql
+++ b/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-oracle10g.sql
@@ -6,6 +6,7 @@ CREATE TABLE TASK_EXECUTION (
TASK_NAME VARCHAR2(100) ,
EXIT_CODE INTEGER ,
EXIT_MESSAGE VARCHAR2(2500) ,
+ ERROR_MESSAGE VARCHAR2(2500) ,
LAST_UPDATED TIMESTAMP
);
diff --git a/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-postgresql.sql b/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-postgresql.sql
index f7ae44e7..89456f6b 100644
--- a/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-postgresql.sql
+++ b/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-postgresql.sql
@@ -6,6 +6,7 @@ CREATE TABLE TASK_EXECUTION (
TASK_NAME VARCHAR(100) ,
EXIT_CODE INTEGER ,
EXIT_MESSAGE VARCHAR(2500) ,
+ ERROR_MESSAGE VARCHAR(2500) ,
LAST_UPDATED TIMESTAMP
);
diff --git a/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-sqlserver.sql b/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-sqlserver.sql
index 7378b5ba..3f84313c 100644
--- a/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-sqlserver.sql
+++ b/spring-cloud-task-core/src/main/resources/org/springframework/cloud/task/schema-sqlserver.sql
@@ -5,6 +5,7 @@ CREATE TABLE TASK_EXECUTION (
TASK_NAME VARCHAR(100) ,
EXIT_CODE INTEGER ,
EXIT_MESSAGE VARCHAR(2500) ,
+ ERROR_MESSAGE VARCHAR(2500) ,
LAST_UPDATED DATETIME
);
diff --git a/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/TaskCoreTests.java b/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/TaskCoreTests.java
index b1bf141e..1e5e3f60 100644
--- a/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/TaskCoreTests.java
+++ b/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/TaskCoreTests.java
@@ -28,8 +28,8 @@ public class TaskCoreTests {
private static final String UPDATE_TASK_MESSAGE = "Updating: TaskExecution with executionId=";
private static final String SUCCESS_EXIT_CODE_MESSAGE = "with the following {exitCode=0";
private static final String EXCEPTION_EXIT_CODE_MESSAGE = "with the following {exitCode=1";
- private static final String EXIT_MESSAGE =
- "exitMessage='java.lang.IllegalStateException: Failed to execute CommandLineRunner";
+ private static final String ERROR_MESSAGE =
+ "errorMessage='java.lang.IllegalStateException: Failed to execute CommandLineRunner";
private ConfigurableApplicationContext applicationContext;
@@ -83,7 +83,7 @@ public class TaskCoreTests {
assertTrue("Test results have incorrect exit code: " + output,
output.contains(EXCEPTION_EXIT_CODE_MESSAGE));
assertTrue("Test results have incorrect exit message: " + output,
- output.contains(EXIT_MESSAGE));
+ output.contains(ERROR_MESSAGE));
assertTrue("Test results have exception message: " + output,
output.contains(EXCEPTION_MESSAGE));
}
diff --git a/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/listener/TaskExecutionListenerTests.java b/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/listener/TaskExecutionListenerTests.java
index 3ea1f7b0..05ad76de 100644
--- a/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/listener/TaskExecutionListenerTests.java
+++ b/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/listener/TaskExecutionListenerTests.java
@@ -71,7 +71,7 @@ public class TaskExecutionListenerTests {
DefaultTaskListenerConfiguration.TestTaskExecutionListener taskExecutionListener =
context.getBean(DefaultTaskListenerConfiguration.TestTaskExecutionListener.class);
TaskExecution taskExecution = new TaskExecution(0, null, "wombat",
- new Date(), new Date(), null, new ArrayList());
+ new Date(), new Date(), null, new ArrayList(), null);
verifyListenerResults(true, false, false, taskExecution,taskExecutionListener);
}
@@ -87,7 +87,7 @@ public class TaskExecutionListenerTests {
context.publishEvent(new ApplicationReadyEvent(new SpringApplication(), new String[0], context));
TaskExecution taskExecution = new TaskExecution(0, 0, "wombat",
- new Date(), new Date(), null, new ArrayList());
+ new Date(), new Date(), null, new ArrayList(), null);
verifyListenerResults(true, true, false, taskExecution,taskExecutionListener);
}
@@ -106,7 +106,7 @@ public class TaskExecutionListenerTests {
context.publishEvent(new ApplicationReadyEvent(application, new String[0], context));
TaskExecution taskExecution = new TaskExecution(0, 1, "wombat", new Date(),
- new Date(), null, new ArrayList());
+ new Date(), null, new ArrayList(), null);
verifyListenerResults(true, true, true, taskExecution,taskExecutionListener);
}
@@ -120,7 +120,7 @@ public class TaskExecutionListenerTests {
DefaultAnnotationConfiguration.AnnotatedTaskListener annotatedListener =
context.getBean(DefaultAnnotationConfiguration.AnnotatedTaskListener.class);
TaskExecution taskExecution = new TaskExecution(0, null, "wombat",
- new Date(), new Date(), null, new ArrayList());
+ new Date(), new Date(), null, new ArrayList(), null);
verifyListenerResults(true, false, false, taskExecution,annotatedListener);
}
@@ -136,7 +136,7 @@ public class TaskExecutionListenerTests {
context.publishEvent(new ApplicationReadyEvent(new SpringApplication(), new String[0], context));
TaskExecution taskExecution = new TaskExecution(0, 0, "wombat",
- new Date(), new Date(), null, new ArrayList());
+ new Date(), new Date(), null, new ArrayList(), null);
verifyListenerResults(true, true, false, taskExecution,annotatedListener);
}
@@ -155,7 +155,7 @@ public class TaskExecutionListenerTests {
context.publishEvent(new ApplicationReadyEvent(application, new String[0], context));
TaskExecution taskExecution = new TaskExecution(0, 1, "wombat", new Date(),
- new Date(), null, new ArrayList());
+ new Date(), null, new ArrayList(), null);
verifyListenerResults(true, true, true, taskExecution,annotatedListener);
}
@@ -169,13 +169,16 @@ public class TaskExecutionListenerTests {
assertEquals(TestListener.END_MESSAGE, actualListener.getTaskExecution().getExitMessage());
assertNotNull(actualListener.getThrowable());
assertTrue(actualListener.getThrowable() instanceof RuntimeException);
+ assertTrue(actualListener.getTaskExecution().getErrorMessage().startsWith("java.lang.RuntimeException: This was expected"));
}
else if(isTaskEnd){
assertEquals(TestListener.END_MESSAGE, actualListener.getTaskExecution().getExitMessage());
+ assertNull(actualListener.getTaskExecution().getErrorMessage());
assertNull(actualListener.getThrowable());
}
else {
assertEquals(TestListener.START_MESSAGE, actualListener.getTaskExecution().getExitMessage());
+ assertNull(actualListener.getTaskExecution().getErrorMessage());
assertNull(actualListener.getThrowable());
}
diff --git a/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/listener/TaskLifecycleListenerTests.java b/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/listener/TaskLifecycleListenerTests.java
index 4e2b3341..ed9f4c87 100644
--- a/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/listener/TaskLifecycleListenerTests.java
+++ b/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/listener/TaskLifecycleListenerTests.java
@@ -139,7 +139,7 @@ public class TaskLifecycleListenerTests {
assertEquals(exitCode, taskExecution.getExitCode());
if(exception != null) {
- assertTrue(taskExecution.getExitMessage().length() > exception.getStackTrace().length);
+ assertTrue(taskExecution.getErrorMessage().length() > exception.getStackTrace().length);
}
else {
assertNull(taskExecution.getExitMessage());
diff --git a/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/repository/database/support/FindAllPagingQueryProviderTests.java b/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/repository/database/support/FindAllPagingQueryProviderTests.java
index d5326b4c..4efe43e0 100644
--- a/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/repository/database/support/FindAllPagingQueryProviderTests.java
+++ b/spring-cloud-task-core/src/test/java/org/springframework/cloud/task/repository/database/support/FindAllPagingQueryProviderTests.java
@@ -16,18 +16,19 @@
package org.springframework.cloud.task.repository.database.support;
-import static org.junit.Assert.assertEquals;
-
import java.util.Arrays;
import java.util.Collection;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
+
import org.springframework.cloud.task.util.TestDBUtils;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
+import static org.junit.Assert.assertEquals;
+
/**
* @author Glenn Renfro
*/
@@ -42,30 +43,30 @@ public class FindAllPagingQueryProviderTests {
public static Collection