File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
log4j-core-test/src/test/java/org/apache/logging/log4j/core/util Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 17
17
package org .apache .logging .log4j .core .util ;
18
18
19
19
import static org .assertj .core .api .Assertions .assertThat ;
20
+ import static org .assertj .core .api .Assumptions .assumeThat ;
20
21
import static org .junit .jupiter .api .Assertions .assertEquals ;
21
22
import static org .junit .jupiter .api .Assertions .assertNotNull ;
22
23
23
24
import java .io .File ;
25
+ import java .net .InetAddress ;
24
26
import java .net .URI ;
27
+ import java .net .UnknownHostException ;
25
28
import org .junit .jupiter .api .Test ;
26
29
import org .junit .jupiter .api .condition .EnabledOnOs ;
27
30
import org .junit .jupiter .api .condition .OS ;
@@ -73,7 +76,8 @@ public void testToUriWindowsAbsolutePath() {
73
76
}
74
77
75
78
@ Test
76
- public void testCanonicalHostName () {
79
+ public void testCanonicalHostName () throws UnknownHostException {
80
+ assumeThat (InetAddress .getLocalHost ().getCanonicalHostName ()).contains ("." );
77
81
// If this fails the host might be misconfigured
78
82
assertThat (NetUtils .getCanonicalLocalHostname ()).contains ("." );
79
83
}
You can’t perform that action at this time.
0 commit comments