Skip to content

Commit 7035699

Browse files
committed
Fix StreamingInboundTests
1 parent a5ab79e commit 7035699

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

spring-integration-file/src/test/java/org/springframework/integration/file/remote/StreamingInboundTests.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ public void testExceptionOnFetch() {
9898
streamer.setRemoteDirectory("/bad");
9999
streamer.afterPropertiesSet();
100100
streamer.start();
101+
streamer.receive();
101102
}
102103

103104
@Test
@@ -226,14 +227,9 @@ public StringRemoteFileTemplate(SessionFactory<String> sessionFactory) {
226227

227228
public static class StringSessionFactory implements SessionFactory<String> {
228229

229-
private Session<String> singletonSession;
230-
231230
@SuppressWarnings("unchecked")
232231
@Override
233232
public Session<String> getSession() {
234-
if (this.singletonSession != null) {
235-
return this.singletonSession;
236-
}
237233
try {
238234
Session<String> session = mock(Session.class);
239235
willReturn(new String[] { "/foo/foo", "/foo/bar" }).given(session).list("/foo");
@@ -253,9 +249,6 @@ public Session<String> getSession() {
253249
willThrow(new IOException("No file")).given(session).readRaw("/bad/file2");
254250

255251
given(session.finalizeRaw()).willReturn(true);
256-
257-
this.singletonSession = session;
258-
259252
return session;
260253
}
261254
catch (Exception e) {

0 commit comments

Comments
 (0)