From 7035699a0be5f3f3c9e165d4a4983548c9109b82 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Fri, 1 Mar 2019 15:50:51 -0500 Subject: [PATCH] Fix `StreamingInboundTests` --- .../integration/file/remote/StreamingInboundTests.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/spring-integration-file/src/test/java/org/springframework/integration/file/remote/StreamingInboundTests.java b/spring-integration-file/src/test/java/org/springframework/integration/file/remote/StreamingInboundTests.java index 6f667d4f3d..1de388d668 100644 --- a/spring-integration-file/src/test/java/org/springframework/integration/file/remote/StreamingInboundTests.java +++ b/spring-integration-file/src/test/java/org/springframework/integration/file/remote/StreamingInboundTests.java @@ -98,6 +98,7 @@ public class StreamingInboundTests { streamer.setRemoteDirectory("/bad"); streamer.afterPropertiesSet(); streamer.start(); + streamer.receive(); } @Test @@ -226,14 +227,9 @@ public class StreamingInboundTests { public static class StringSessionFactory implements SessionFactory { - private Session singletonSession; - @SuppressWarnings("unchecked") @Override public Session getSession() { - if (this.singletonSession != null) { - return this.singletonSession; - } try { Session session = mock(Session.class); willReturn(new String[] { "/foo/foo", "/foo/bar" }).given(session).list("/foo"); @@ -253,9 +249,6 @@ public class StreamingInboundTests { willThrow(new IOException("No file")).given(session).readRaw("/bad/file2"); given(session.finalizeRaw()).willReturn(true); - - this.singletonSession = session; - return session; } catch (Exception e) {