Tweak config in integratio ntests for MySQL
This commit is contained in:
@@ -108,6 +108,21 @@ public class JdbcJobRepositoryTests {
|
||||
assertNotNull(execution.getId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFindOrCreateJobWithExecutionContext() throws Exception {
|
||||
job.setName("foo");
|
||||
int before = 0;
|
||||
JobExecution execution = repository.createJobExecution(job.getName(), new JobParameters());
|
||||
execution.getExecutionContext().put("foo", "bar");
|
||||
repository.updateExecutionContext(execution);
|
||||
int after = simpleJdbcTemplate.queryForInt("SELECT COUNT(*) FROM BATCH_JOB_EXECUTION_CONTEXT");
|
||||
assertEquals(before + 1, after);
|
||||
assertNotNull(execution.getId());
|
||||
JobExecution last = repository.getLastJobExecution(job.getName(), new JobParameters());
|
||||
assertEquals(execution, last);
|
||||
assertEquals(execution.getExecutionContext(), last.getExecutionContext());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFindOrCreateJobConcurrently() throws Exception {
|
||||
|
||||
|
||||
@@ -4,13 +4,10 @@ batch.jdbc.driver=com.mysql.jdbc.Driver
|
||||
batch.jdbc.url=jdbc:mysql://localhost/test
|
||||
batch.jdbc.user=root
|
||||
batch.jdbc.password=root
|
||||
batch.schema=
|
||||
batch.jndi.name=
|
||||
batch.naming.factory.initial=
|
||||
batch.naming.provider.url=
|
||||
batch.schema.script=classpath:/org/springframework/batch/core/schema-mysql.sql
|
||||
batch.drop.script=
|
||||
batch.business.schema.script=business-schema-mysql.sql
|
||||
batch.business.schema.script=classpath:/business-schema-mysql.sql
|
||||
batch.data.source.init=false
|
||||
batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.MySQLMaxValueIncrementer
|
||||
batch.database.incrementer.parent=columnIncrementerParent
|
||||
batch.lob.handler.class=org.springframework.jdbc.support.lob.DefaultLobHandler
|
||||
batch.verify.cursor.position=true
|
||||
Reference in New Issue
Block a user