Upgraded dependency versions and minor polish
This commit is contained in:
@@ -15,23 +15,16 @@
|
||||
*/
|
||||
package org.springframework.batch.core.repository.support;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DatabaseMetaData;
|
||||
import java.sql.Types;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.batch.core.JobParameters;
|
||||
import org.springframework.batch.core.repository.ExecutionContextSerializer;
|
||||
import org.springframework.batch.core.repository.JobRepository;
|
||||
@@ -45,11 +38,17 @@ import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer;
|
||||
import org.springframework.jdbc.support.lob.DefaultLobHandler;
|
||||
import org.springframework.jdbc.support.lob.LobHandler;
|
||||
import org.springframework.jdbc.support.lob.OracleLobHandler;
|
||||
import org.springframework.test.util.ReflectionTestUtils;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.support.DefaultTransactionDefinition;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
/**
|
||||
* @author Lucas Ward
|
||||
* @author Will Schipp
|
||||
@@ -115,7 +114,7 @@ public class JobRepositoryFactoryBeanTests {
|
||||
|
||||
factory.afterPropertiesSet();
|
||||
LobHandler lobHandler = (LobHandler) ReflectionTestUtils.getField(factory, "lobHandler");
|
||||
assertTrue(lobHandler instanceof OracleLobHandler);
|
||||
assertTrue(lobHandler instanceof DefaultLobHandler);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -15,9 +15,27 @@
|
||||
*/
|
||||
package org.springframework.batch.core.step.builder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.core.*;
|
||||
import org.springframework.batch.core.annotation.*;
|
||||
|
||||
import org.springframework.batch.core.BatchStatus;
|
||||
import org.springframework.batch.core.ExitStatus;
|
||||
import org.springframework.batch.core.JobParameters;
|
||||
import org.springframework.batch.core.StepContribution;
|
||||
import org.springframework.batch.core.StepExecution;
|
||||
import org.springframework.batch.core.StepExecutionListener;
|
||||
import org.springframework.batch.core.annotation.AfterChunk;
|
||||
import org.springframework.batch.core.annotation.AfterProcess;
|
||||
import org.springframework.batch.core.annotation.AfterRead;
|
||||
import org.springframework.batch.core.annotation.AfterStep;
|
||||
import org.springframework.batch.core.annotation.AfterWrite;
|
||||
import org.springframework.batch.core.annotation.BeforeChunk;
|
||||
import org.springframework.batch.core.annotation.BeforeProcess;
|
||||
import org.springframework.batch.core.annotation.BeforeRead;
|
||||
import org.springframework.batch.core.annotation.BeforeStep;
|
||||
import org.springframework.batch.core.annotation.BeforeWrite;
|
||||
import org.springframework.batch.core.configuration.xml.DummyItemWriter;
|
||||
import org.springframework.batch.core.repository.JobRepository;
|
||||
import org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean;
|
||||
@@ -30,9 +48,6 @@ import org.springframework.batch.repeat.RepeatStatus;
|
||||
import org.springframework.batch.support.transaction.ResourcelessTransactionManager;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
/**
|
||||
@@ -63,7 +78,7 @@ public class StepBuilderTests {
|
||||
|
||||
@Test
|
||||
public void testListeners() throws Exception {
|
||||
JobRepository jobRepository = new MapJobRepositoryFactoryBean().getJobRepository();
|
||||
JobRepository jobRepository = new MapJobRepositoryFactoryBean().getObject();
|
||||
StepExecution execution = jobRepository.createJobExecution("foo", new JobParameters()).createStepExecution("step");
|
||||
jobRepository.add(execution);
|
||||
PlatformTransactionManager transactionManager = new ResourcelessTransactionManager();
|
||||
@@ -89,7 +104,7 @@ public class StepBuilderTests {
|
||||
|
||||
@Test
|
||||
public void testItemListeners() throws Exception {
|
||||
JobRepository jobRepository = new MapJobRepositoryFactoryBean().getJobRepository();
|
||||
JobRepository jobRepository = new MapJobRepositoryFactoryBean().getObject();
|
||||
StepExecution execution = jobRepository.createJobExecution("foo", new JobParameters()).createStepExecution("step");
|
||||
jobRepository.add(execution);
|
||||
PlatformTransactionManager transactionManager = new ResourcelessTransactionManager();
|
||||
|
||||
Reference in New Issue
Block a user