Skip to content

Commit 6902a6b

Browse files
committed
SNI fixes
1 parent 33176b6 commit 6902a6b

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

quickfixj-core/src/test/java/quickfix/mina/ssl/SSLCertificateTest.java

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@
2424
import org.burningwave.tools.net.DefaultHostResolver;
2525
import org.burningwave.tools.net.HostResolutionRequestInterceptor;
2626
import org.burningwave.tools.net.MappedHostResolver;
27-
import org.junit.AfterClass;
2827
import org.junit.Before;
29-
import org.junit.BeforeClass;
3028
import org.junit.Test;
3129
import org.junit.runner.RunWith;
3230
import org.junit.runners.Parameterized;
@@ -68,7 +66,6 @@
6866
import java.util.concurrent.CountDownLatch;
6967
import java.util.concurrent.TimeUnit;
7068
import java.util.concurrent.atomic.AtomicReference;
71-
import java.util.logging.Level;
7269
import org.apache.mina.util.AvailablePortFinder;
7370
import org.junit.After;
7471
import quickfix.mina.SocksProxyServer;
@@ -97,27 +94,23 @@ public SSLCertificateTest(String enabledCipherSuites, String enabledProtocols) {
9794
this.enabledProtocols = enabledProtocols;
9895
}
9996

100-
@BeforeClass
101-
public static void setUpClass() {
97+
@Before
98+
public void setUp() {
10299
Map<String, String> hostAliases = new HashMap<>();
103100
hostAliases.put(LOCALHOST_ALIAS, "127.0.0.1");
104101

105102
HostResolutionRequestInterceptor.INSTANCE.install(new MappedHostResolver(hostAliases), DefaultHostResolver.INSTANCE);
106103
}
107104

108-
@AfterClass
109-
public static void tearDownClass() {
110-
HostResolutionRequestInterceptor.INSTANCE.uninstall();
111-
}
112-
113105
@After
114106
public void tearDown() {
115107
try {
116108
Thread.sleep(500);
117109
} catch (InterruptedException ex) {
118110
Thread.currentThread().interrupt();
119-
java.util.logging.Logger.getLogger(SSLCertificateTest.class.getName()).log(Level.SEVERE, null, ex);
120111
}
112+
113+
HostResolutionRequestInterceptor.INSTANCE.uninstall();
121114
}
122115

123116
@Test

0 commit comments

Comments
 (0)