INT-1704 fixed FTP/SFTP tests that broke the build due to the change introduced with file renaming
This commit is contained in:
@@ -137,7 +137,8 @@ public class FtpSendingMessageHandlerTest {
|
||||
public Boolean answer(InvocationOnMock invocation)
|
||||
throws Throwable {
|
||||
File file = new File((String) invocation.getArguments()[0]);
|
||||
file.renameTo(new File(file.getParent(), (String) invocation.getArguments()[1]));
|
||||
File renameToFile = new File((String) invocation.getArguments()[1]);
|
||||
file.renameTo(renameToFile);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -126,7 +126,8 @@ public class SftpSendingMessageHandlerTests {
|
||||
throws Throwable {
|
||||
File file = new File((String) invocation.getArguments()[0]);
|
||||
assertTrue(file.getName().endsWith(FileWritingMessageHandler.TEMPORARY_FILE_SUFFIX));
|
||||
file.renameTo(new File(file.getParent(), (String) invocation.getArguments()[1]));
|
||||
File renameToFile = new File((String) invocation.getArguments()[1]);
|
||||
file.renameTo(renameToFile);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user