2929import java .util .List ;
3030
3131import org .apache .sshd .client .session .ClientSession ;
32+ import org .apache .sshd .common .session .Session ;
33+ import org .apache .sshd .common .session .SessionListener ;
3234import org .apache .sshd .core .CoreModuleProperties ;
3335import org .apache .sshd .sftp .client .fs .SftpFileSystem ;
36+ import org .junit .jupiter .api .BeforeAll ;
3437import org .junit .jupiter .api .MethodOrderer .MethodName ;
3538import org .junit .jupiter .api .TestMethodOrder ;
3639import org .junit .jupiter .params .ParameterizedTest ;
3740import org .junit .jupiter .params .provider .MethodSource ;
41+ import org .slf4j .Logger ;
42+ import org .slf4j .LoggerFactory ;
3843
3944@ TestMethodOrder (MethodName .class )
4045class SftpTransferTest extends AbstractSftpClientTestSupport {
4146
47+ private static final Logger LOG = LoggerFactory .getLogger (SftpTransferTest .class );
48+
4249 private static final int BUFFER_SIZE = 8192 ;
4350
4451 static List <Long > getParameters () {
@@ -48,6 +55,16 @@ static List<Long> getParameters() {
4855 return params ;
4956 }
5057
58+ @ BeforeAll
59+ static void logExceptions () {
60+ sshd .addSessionListener (new SessionListener () {
61+ @ Override
62+ public void sessionException (Session session , Throwable t ) {
63+ LOG .warn ("**** Session {} caught exception" , session , t );
64+ }
65+ });
66+ }
67+
5168 @ MethodSource ("getParameters" )
5269 @ ParameterizedTest (name = "REKEY_BLOCK_SIZE {0}" )
5370 void transferIntegrity (long rekeyBlockSize ) throws IOException {
0 commit comments