|
24 | 24 | import org.burningwave.tools.net.DefaultHostResolver; |
25 | 25 | import org.burningwave.tools.net.HostResolutionRequestInterceptor; |
26 | 26 | import org.burningwave.tools.net.MappedHostResolver; |
27 | | -import org.junit.AfterClass; |
28 | 27 | import org.junit.Before; |
29 | | -import org.junit.BeforeClass; |
30 | 28 | import org.junit.Test; |
31 | 29 | import org.junit.runner.RunWith; |
32 | 30 | import org.junit.runners.Parameterized; |
|
68 | 66 | import java.util.concurrent.CountDownLatch; |
69 | 67 | import java.util.concurrent.TimeUnit; |
70 | 68 | import java.util.concurrent.atomic.AtomicReference; |
71 | | -import java.util.logging.Level; |
72 | 69 | import org.apache.mina.util.AvailablePortFinder; |
73 | 70 | import org.junit.After; |
74 | 71 | import quickfix.mina.SocksProxyServer; |
@@ -97,27 +94,23 @@ public SSLCertificateTest(String enabledCipherSuites, String enabledProtocols) { |
97 | 94 | this.enabledProtocols = enabledProtocols; |
98 | 95 | } |
99 | 96 |
|
100 | | - @BeforeClass |
101 | | - public static void setUpClass() { |
| 97 | + @Before |
| 98 | + public void setUp() { |
102 | 99 | Map<String, String> hostAliases = new HashMap<>(); |
103 | 100 | hostAliases.put(LOCALHOST_ALIAS, "127.0.0.1"); |
104 | 101 |
|
105 | 102 | HostResolutionRequestInterceptor.INSTANCE.install(new MappedHostResolver(hostAliases), DefaultHostResolver.INSTANCE); |
106 | 103 | } |
107 | 104 |
|
108 | | - @AfterClass |
109 | | - public static void tearDownClass() { |
110 | | - HostResolutionRequestInterceptor.INSTANCE.uninstall(); |
111 | | - } |
112 | | - |
113 | 105 | @After |
114 | 106 | public void tearDown() { |
115 | 107 | try { |
116 | 108 | Thread.sleep(500); |
117 | 109 | } catch (InterruptedException ex) { |
118 | 110 | Thread.currentThread().interrupt(); |
119 | | - java.util.logging.Logger.getLogger(SSLCertificateTest.class.getName()).log(Level.SEVERE, null, ex); |
120 | 111 | } |
| 112 | + |
| 113 | + HostResolutionRequestInterceptor.INSTANCE.uninstall(); |
121 | 114 | } |
122 | 115 |
|
123 | 116 | @Test |
|
0 commit comments