Skip to content

Commit

Permalink
[UNDERTOW-1833] Unneccessary code removed from the test.
Browse files Browse the repository at this point in the history
This is a trivial change of removal unused and unnecessary code in
the Http2EndExchangeTestCase.java test case. There is no other
problem in the test as it is passing just fine. I just got around
this when I was investigating something else.
  • Loading branch information
jstourac committed Jan 24, 2021
1 parent 1a10af5 commit 9fd95a8
Showing 1 changed file with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import io.undertow.server.handlers.BlockingHandler;
import io.undertow.testutils.DefaultServer;
import io.undertow.testutils.HttpOneOnly;
import io.undertow.util.AttachmentKey;
import io.undertow.util.Headers;
import io.undertow.util.Methods;
import io.undertow.util.Protocols;
Expand Down Expand Up @@ -56,15 +55,11 @@ public class Http2EndExchangeTestCase {


private static final Logger log = Logger.getLogger(Http2EndExchangeTestCase.class);
private static final String message = "Hello World!";
public static final String MESSAGE = "/message";
public static final String POST = "/post";
private static final String MESSAGE = "/message";

private static final OptionMap DEFAULT_OPTIONS;
private static URI ADDRESS;

private static final AttachmentKey<String> RESPONSE_BODY = AttachmentKey.create(String.class);

static {
final OptionMap.Builder builder = OptionMap.builder()
.set(Options.WORKER_IO_THREADS, 8)
Expand Down Expand Up @@ -92,7 +87,8 @@ public void testHttp2EndExchangeWithBrokenConnection() throws Exception {
@Override
public void handleRequest(HttpServerExchange exchange) throws Exception {
if (!exchange.getProtocol().equals(Protocols.HTTP_2_0)) {
throw new RuntimeException("Not HTTP/2");
testResult.completeExceptionally(new RuntimeException("Not HTTP/2 request"));
return;
}
requestStartedLatch.countDown();
log.debug("Received Request");
Expand Down Expand Up @@ -187,10 +183,6 @@ public void failed(IOException e) {
}

static UndertowClient createClient() {
return createClient(OptionMap.EMPTY);
}

static UndertowClient createClient(final OptionMap options) {
return UndertowClient.getInstance();
}
}

0 comments on commit 9fd95a8

Please sign in to comment.