Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UNDERTOW-1833] Unneccessary code removed from the test. #1025

Merged
merged 1 commit into from
Feb 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();
}
}