IN PROGRESS - issue BATCH-7: Remove transaction synchronization and state management from input/output sources (formerly buffering)

http://jira.springframework.org/browse/BATCH-7

Lazy-initialisation solution to the "who's in step scope" issue
This commit is contained in:
dsyer
2008-01-31 09:54:38 +00:00
parent 9d1ebb42c7
commit 15cffeb925
66 changed files with 653 additions and 761 deletions

View File

@@ -46,15 +46,15 @@ public class StepInstanceTests extends TestCase {
}
/**
* Test method for {@link org.springframework.batch.core.domain.StepInstance#getRestartData()}.
* Test method for {@link org.springframework.batch.core.domain.StepInstance#getStreamContext()}.
*/
public void testGetRestartData() {
assertNotNull(instance.getRestartData());
assertTrue(instance.getRestartData().getProperties().isEmpty());
instance.setRestartData(new GenericStreamContext(new Properties() {{
public void testGetStreamContext() {
assertNotNull(instance.getStreamContext());
assertTrue(instance.getStreamContext().getProperties().isEmpty());
instance.setStreamContext(new GenericStreamContext(new Properties() {{
setProperty("foo", "bar");
}}));
assertEquals("bar", instance.getRestartData().getProperties().getProperty("foo"));
assertEquals("bar", instance.getStreamContext().getProperties().getProperty("foo"));
}
/**

View File

@@ -64,9 +64,9 @@ public class StepSupportTests extends TestCase {
}
public void testSaveRestartFlag() throws Exception {
assertEquals(false, configuration.isSaveRestartData());
configuration.setSaveRestartData(true);
assertEquals(true, configuration.isSaveRestartData());
assertEquals(false, configuration.isSaveStreamContext());
configuration.setSaveStreamContext(true);
assertEquals(true, configuration.isSaveStreamContext());
}
/**