|
28 | 28 | import org.junit.jupiter.api.BeforeEach;
|
29 | 29 | import org.junit.jupiter.api.BeforeAll;
|
30 | 30 | import org.junit.jupiter.api.Test;
|
| 31 | +import org.junit.jupiter.api.Timeout; |
31 | 32 | import org.mockito.invocation.InvocationOnMock;
|
32 | 33 | import org.mockito.stubbing.Answer;
|
33 | 34 | import org.slf4j.event.Level;
|
|
38 | 39 | import java.net.URISyntaxException;
|
39 | 40 | import java.util.HashMap;
|
40 | 41 | import java.util.Map;
|
| 42 | +import java.util.concurrent.TimeUnit; |
41 | 43 | import java.util.concurrent.atomic.AtomicBoolean;
|
42 | 44 | import java.util.concurrent.atomic.AtomicInteger;
|
43 | 45 |
|
|
46 | 48 | import static org.junit.jupiter.api.Assertions.assertNull;
|
47 | 49 | import static org.junit.jupiter.api.Assertions.assertThrows;
|
48 | 50 | import static org.junit.jupiter.api.Assertions.assertTrue;
|
| 51 | +import static org.junit.jupiter.api.Timeout.ThreadMode.SEPARATE_THREAD; |
49 | 52 | import static org.mockito.Mockito.mock;
|
50 | 53 | import static org.mockito.Mockito.when;
|
51 | 54 |
|
@@ -344,6 +347,8 @@ private void testResolveDomainNameUsingDNS(boolean useFQDN) throws Exception {
|
344 | 347 | assertTrue(nn2Count.get() > 0, "nn2 should have been selected: " + nn2Count.get());
|
345 | 348 | }
|
346 | 349 |
|
| 350 | + // FIXME Sometimes java.net.Inet4AddressImpl.lookupAllHostAddr() hangs. Why ? |
| 351 | + @Timeout(value=1, unit = TimeUnit.MINUTES, threadMode = SEPARATE_THREAD) |
347 | 352 | @Test
|
348 | 353 | public void testResolveDomainNameUsingDNS() throws Exception {
|
349 | 354 | // test resolving to IP
|
|
0 commit comments