From d624688f0823eecfe5026db50e02bb264e9a3bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Prante?= Date: Thu, 14 Mar 2024 18:58:05 +0100 Subject: [PATCH] cosmetic fixes --- .../src/test/java/module-info.java | 1 + .../net/http/client/netty/secure/test/Https1Test.java | 4 ++-- .../org/xbib/net/http/client/netty/test/Http1Test.java | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/net-http-client-netty-secure/src/test/java/module-info.java b/net-http-client-netty-secure/src/test/java/module-info.java index 0fb1ee5..d97c5f4 100644 --- a/net-http-client-netty-secure/src/test/java/module-info.java +++ b/net-http-client-netty-secure/src/test/java/module-info.java @@ -14,6 +14,7 @@ module org.xbib.net.http.client.netty.secure.test { requires org.xbib.net.http.client; requires org.xbib.net.http.client.netty; requires org.xbib.net.http.client.netty.secure; + requires io.netty.handler.proxy; exports org.xbib.net.http.client.netty.secure.test; opens org.xbib.net.http.client.netty.secure.test; } diff --git a/net-http-client-netty-secure/src/test/java/org/xbib/net/http/client/netty/secure/test/Https1Test.java b/net-http-client-netty-secure/src/test/java/org/xbib/net/http/client/netty/secure/test/Https1Test.java index 069d081..6a09f4c 100644 --- a/net-http-client-netty-secure/src/test/java/org/xbib/net/http/client/netty/secure/test/Https1Test.java +++ b/net-http-client-netty-secure/src/test/java/org/xbib/net/http/client/netty/secure/test/Https1Test.java @@ -46,8 +46,8 @@ class Https1Test { " headers = " + resp.getHeaders() + " body = " + resp.getBodyAsChars(StandardCharsets.UTF_8) + " ssl = " + dumpCertificates((HttpsResponse) resp))) - .build(); - client.execute(request).get().close(); + .build(); + client.execute(request).get().close(); } } diff --git a/net-http-client-netty/src/test/java/org/xbib/net/http/client/netty/test/Http1Test.java b/net-http-client-netty/src/test/java/org/xbib/net/http/client/netty/test/Http1Test.java index 0477bfd..770c992 100644 --- a/net-http-client-netty/src/test/java/org/xbib/net/http/client/netty/test/Http1Test.java +++ b/net-http-client-netty/src/test/java/org/xbib/net/http/client/netty/test/Http1Test.java @@ -24,16 +24,16 @@ class Http1Test { .setConfig(config) .build()) { HttpRequest request = HttpRequest.get() - .setURL("http://httpbin.org") - .setResponseListener(resp -> { + .setURL("http://httpbin.org") + .setResponseListener(resp -> { logger.log(Level.INFO, "local address = " + resp.getLocalAddress() + - " got response = " + resp.getHeaders() + + " got response = " + resp.getHeaders() + resp.getBodyAsChars(StandardCharsets.UTF_8) + " status=" + resp.getStatus()); received.set(true); - }) - .build(); + }) + .build(); client.execute(request).get().close(); } assertTrue(received.get());