File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed
src/test/java/com/github/stefanbirkner/fakesftpserver/rule Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 7575 <version >[3.9.1]</version >
7676 <scope >test</scope >
7777 </dependency >
78- <dependency >
79- <groupId >org.slf4j </groupId >
80- <artifactId >slf4j-nop </artifactId >
81- <version >[1.7.25] </version >
82- <scope >test</scope >
78+ <dependency >
79+ <groupId >ch.qos.logback </groupId >
80+ <artifactId >logback-classic </artifactId >
81+ <version >1.2.3 </version >
82+ <scope >test</scope >
8383 </dependency >
8484 </dependencies >
8585</project >
Original file line number Diff line number Diff line change 3131import com .jcraft .jsch .ChannelSftp ;
3232import com .jcraft .jsch .JSch ;
3333import com .jcraft .jsch .JSchException ;
34+ import com .jcraft .jsch .Logger ;
3435import com .jcraft .jsch .Session ;
3536import com .jcraft .jsch .SftpException ;
3637
@@ -341,6 +342,17 @@ public void the_last_key_is_effective_if_addIdentity_is_called_multiple_times()
341342 FakeSftpServerRule sftpServer = new FakeSftpServerRule ()
342343 .addIdentity ("dummy user" , EMPTY_AUTHORIZED_KEYS )
343344 .addIdentity ("dummy user" , DUMMY_AUTHORIZED_KEYS );
345+ JSCH .setLogger (new Logger () {
346+ @ Override
347+ public void log (int level , String message ) {
348+ log .info (message );
349+ }
350+
351+ @ Override
352+ public boolean isEnabled (int level ) {
353+ return true ;
354+ }
355+ });
344356 executeTestWithRule (
345357 () -> {
346358 Session session = createSessionWithIdentity (
@@ -354,6 +366,7 @@ public void the_last_key_is_effective_if_addIdentity_is_called_multiple_times()
354366 },
355367 sftpServer
356368 );
369+ JSCH .setLogger (null );
357370 }
358371 }
359372
You can’t perform that action at this time.
0 commit comments