16
16
*/
17
17
package org .apache .logging .log4j .core .appender .rolling ;
18
18
19
+ import static junit .framework .Assert .fail ;
19
20
import static org .apache .logging .log4j .core .test .hamcrest .Descriptors .that ;
20
21
import static org .apache .logging .log4j .core .test .hamcrest .FileMatchers .hasName ;
21
22
import static org .hamcrest .Matchers .endsWith ;
22
23
import static org .hamcrest .Matchers .hasItemInArray ;
23
- import static org .junit .jupiter .api .Assertions .assertNotNull ;
24
- import static org .junit .jupiter .api .Assertions .assertTrue ;
25
- import static org .junit .jupiter .api .Assertions .fail ;
26
- import static org .junit .jupiter .api .Assumptions .assumeTrue ;
24
+ import static org .junit .Assert .assertNotNull ;
25
+ import static org .junit .Assert .assertTrue ;
26
+ import static org .junit .Assume .assumeTrue ;
27
27
28
28
import java .io .File ;
29
29
import java .io .IOException ;
@@ -100,7 +100,7 @@ public void testAppender() throws Exception {
100
100
Thread .yield ();
101
101
final String name = "RollingFile" ;
102
102
final RollingFileAppender appender = loggerContextRule .getAppender (name );
103
- assertNotNull (appender , name );
103
+ assertNotNull (name , appender );
104
104
if (appender .getManager ().getSemaphore ().tryAcquire (5 , TimeUnit .SECONDS )) {
105
105
// If we are in here, either the rollover is done or has not taken place yet.
106
106
validate ();
@@ -114,7 +114,7 @@ private void validate() {
114
114
final File [] files = DIR .toFile ().listFiles ();
115
115
Arrays .sort (files );
116
116
assertTrue (
117
- hasGzippedFile . matches (files ),
118
- () -> "was expecting files with '.gz' suffix, found: " + Arrays . toString (files ));
117
+ "was expecting files with '.gz' suffix, found: " + Arrays . toString (files ),
118
+ hasGzippedFile . matches (files ));
119
119
}
120
120
}
0 commit comments