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:
@@ -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"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user