INT-1864 added inbound SFTP test for default adapter configuration (should have CachingSessionFactory)
This commit is contained in:
@@ -31,8 +31,18 @@
|
||||
<beans:property name="user" value="oleg"/>
|
||||
</beans:bean>
|
||||
|
||||
<sftp:inbound-channel-adapter id="defaultAdapter"
|
||||
session-factory="sftpSessionFactory"
|
||||
channel="requestChannel"
|
||||
remote-directory="/foo"
|
||||
local-directory="file:local-test-dir"
|
||||
auto-startup="false">
|
||||
<poller fixed-rate="1000"/>
|
||||
</sftp:inbound-channel-adapter>
|
||||
|
||||
<sftp:inbound-channel-adapter id="cachingAdapter"
|
||||
session-factory="sftpSessionFactory"
|
||||
cache-sessions="true"
|
||||
channel="requestChannel"
|
||||
remote-directory="/foo"
|
||||
local-directory="file:local-test-dir"
|
||||
|
||||
@@ -35,11 +35,19 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
public class InboundChannelAdapterParserCachingTests {
|
||||
|
||||
@Autowired private Object defaultAdapter;
|
||||
|
||||
@Autowired private Object cachingAdapter;
|
||||
|
||||
@Autowired private Object nonCachingAdapter;
|
||||
|
||||
|
||||
@Test
|
||||
public void defaultAdapter() {
|
||||
Object sessionFactory = TestUtils.getPropertyValue(defaultAdapter, "source.synchronizer.sessionFactory");
|
||||
assertEquals(CachingSessionFactory.class, sessionFactory.getClass());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void cachingAdapter() {
|
||||
Object sessionFactory = TestUtils.getPropertyValue(cachingAdapter, "source.synchronizer.sessionFactory");
|
||||
|
||||
Reference in New Issue
Block a user