Tweak config in integratio ntests for MySQL

This commit is contained in:
Dave Syer
2011-01-28 13:50:17 +00:00
parent 260da23ef6
commit a90aad85fd
2 changed files with 18 additions and 6 deletions

View File

@@ -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 {

View File

@@ -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