Skip to content

Commit

Permalink
[UNDERTOW-2212] At the HttpClientTestCase.testSslServerIdentity test,…
Browse files Browse the repository at this point in the history
… do not enforce the exception to be of type ClosedChannelException (see UNDERTOW-2249).

Signed-off-by: Flavia Rainone <[email protected]>
  • Loading branch information
fl4via committed Mar 26, 2023
1 parent a4d3b16 commit a511cb5
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions core/src/test/java/io/undertow/client/http/HttpClientTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,6 @@

package io.undertow.client.http;

import java.io.IOException;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.ByteBuffer;
import java.nio.channels.ClosedChannelException;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

import javax.net.ssl.SSLContext;

import io.undertow.client.ClientCallback;
import io.undertow.client.ClientConnection;
import io.undertow.client.ClientExchange;
Expand Down Expand Up @@ -67,6 +53,18 @@
import org.xnio.channels.StreamSinkChannel;
import org.xnio.ssl.XnioSsl;

import javax.net.ssl.SSLContext;
import java.io.IOException;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.ByteBuffer;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

import static io.undertow.testutils.StopServerWithExternalWorkerUtils.stopWorker;

/**
Expand Down Expand Up @@ -362,7 +360,8 @@ public void testSslServerIdentity() throws Exception {
latch.await(10, TimeUnit.SECONDS);

Assert.assertEquals(0, responses.size());
Assert.assertTrue(exception instanceof ClosedChannelException);
// see UNDERTOW-2249: assert exception instanceof ClosedChannelException
Assert.assertNotNull(exception);
} finally {
connection.getIoThread().execute(() -> IoUtils.safeClose(connection));
DefaultServer.stopSSLServer();
Expand Down

0 comments on commit a511cb5

Please sign in to comment.