You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows is too scrupulous for non closed file resources.
Our `RemoteFileTestSupport` recreates a test directory with files
for each test.
When we don't close some file handler, we are not able to delete the
directory and we fail with subsequent tests.
* Close `InputStream` for each polled file in new tests in the
`SftpStreamingMessageSourceTests`
* Close `CLOSEABLE_RESOURCE` in new tests in the
`FtpStreamingMessageSourceTests`
* Rework `FtpStreamingMessageSourceTests.testAllContents()` do not
poll all the files on each polling cycle - this causes a race condition
when we don't close `CLOSEABLE_RESOURCE` yet in the `StreamTransformer`,
but try to proceed with recreation a test directory structure
**Cherry-pick to 5.0.x**
(cherry picked from commit 6ecd948)
Copy file name to clipboardExpand all lines: spring-integration-ftp/src/test/java/org/springframework/integration/ftp/inbound/FtpStreamingMessageSourceTests.java
Copy file name to clipboardExpand all lines: spring-integration-sftp/src/test/java/org/springframework/integration/sftp/inbound/SftpStreamingMessageSourceTests.java
+11-3Lines changed: 11 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@
23
23
importstaticorg.junit.Assert.assertNotNull;
24
24
importstaticorg.junit.Assert.assertThat;
25
25
26
+
importjava.io.IOException;
26
27
importjava.io.InputStream;
27
28
importjava.util.Arrays;
28
29
importjava.util.Comparator;
@@ -59,6 +60,7 @@
59
60
/**
60
61
* @author Gary Russell
61
62
* @author Artem Bilan
63
+
*
62
64
* @since 4.3
63
65
*
64
66
*/
@@ -119,36 +121,42 @@ public void testAllContents() {
0 commit comments