OPEN - issue BATCH-364: StepScope responsibilities can be assumed by Step (not ApplicationContext)

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

Instead of lazy open, throw exception is stream is used before open().
This commit is contained in:
dsyer
2008-02-15 09:19:25 +00:00
parent ff0f6266a9
commit 711d0c6e92
15 changed files with 167 additions and 671 deletions

View File

@@ -29,9 +29,7 @@ import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
* Abstract unit test for running functional tests by getting context locations
* for both the container and configuration separately and having them auto
* wired in by type. This allows the two to be completely separated, and remove
* any 'configuration coupling' between the two. However, it is still purely
* theoretical until a decision is made as to how job configuration and
* container configuration files are pulled together.
* any 'configuration coupling' between the two.
*
* @author Lucas Ward
*

View File

@@ -60,6 +60,8 @@ public class FixedLengthImportJobFunctionalTests extends AbstractValidatingBatch
* @throws Exception
*/
protected void validatePostConditions() throws Exception {
inputSource.open();
jdbcTemplate.query("SELECT ID, ISIN, QUANTITY, PRICE, CUSTOMER FROM trade ORDER BY id", new RowCallbackHandler() {

View File

@@ -48,6 +48,7 @@ public class StagingItemReaderTests extends AbstractTransactionalDataSourceSprin
writer.write("BAR");
writer.write("SPAM");
writer.write("BUCKET");
provider.open();
}
protected void onTearDownAfterTransaction() throws Exception {