Commit Graph

7 Commits

Author SHA1 Message Date
Artem Bilan
e35d441691 File-split-ftp: fix read files race condition
https://build.spring.io/browse/INTSAMPLES-NIGHTLY-1898/

There is no guarantee that if `File.exists()`, the real write to file has occurred

 * Add `while()` to check not only `File.exists()` but also its `length()` only after that proceed to assert logic
2016-10-25 10:34:54 -04:00
Artem Bilan
ef31a187c4 Revert usage for fileNameExpression
Since we provide a custom `FileNameGenerator` via `fileNameExpression` we should ensure somehow `BeanFactory` injection to that
`FileWritingMessageHandlerSpec` is a `FactoryBean` since version DSL `1.2` and a particular `BPP` takes care about `Spec` internals and register custom `FileNameGenerator` as a bean.

 Use standard `FactoryBean` injection in the `lines()` flow to populate the target `FileWritingMessageHandler` to the flow
Generate pom for all project to apply SI Java DSL 1.2 GA
2016-10-14 13:28:27 -04:00
Artem Bilan
a9d653b19e Upgrade to SI-Java_DSL-1.2.RELEASE
Fixes GH-180 (https://github.com/spring-projects/spring-integration-samples/issues/180)

* Apply `PollerSpec.errorChannel(String)` style
* Replace `fileNameExpression()` to `fileNameGenerator()` to avoid `No BeanFactory` for `EvaluationContext`
* Use `.trigger()` instead of `.handle()` for `FileWritingMessageHandler.trigger()`
* Fix race condition in test, when file exists already, but there is no content yet
2016-10-14 12:57:42 -04:00
Gary Russell
933b3f015a file-split-ftp Move errorChannel to Poller 2016-10-13 17:22:33 -04:00
Gary Russell
b3bab0dea2 Revert "file-split-ftp Move errorChannel to Poller"
This reverts commit 7b84810388.
2016-10-13 17:21:49 -04:00
Gary Russell
7b84810388 file-split-ftp Move errorChannel to Poller 2016-10-13 17:18:17 -04:00
Gary Russell
2c1a070930 Add file-split-ftp Sample
JIRA: https://jira.spring.io/browse/INTSAMPLES-149

Polishing - PR Comments

Polishing - Work Around DSL Issue #119

Make test compatible with Windows.
Also reset Application context `DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD`.
Since tests uses the same target resources we should be sure that they use clear foundation before running
2016-09-21 11:15:14 -04:00