diff --git a/reactor-netty-http/src/test/java/reactor/netty/http/client/HttpClientTest.java b/reactor-netty-http/src/test/java/reactor/netty/http/client/HttpClientTest.java index 3a904a577..c6e6b7c2b 100644 --- a/reactor-netty-http/src/test/java/reactor/netty/http/client/HttpClientTest.java +++ b/reactor-netty-http/src/test/java/reactor/netty/http/client/HttpClientTest.java @@ -622,6 +622,8 @@ void sslExchangeRelativeGet() throws SSLException { @ParameterizedTest @ValueSource(booleans = {true, false}) void testMaxConnectionPools(boolean withMaxConnectionPools) throws SSLException { + Logger spyLogger = Mockito.spy(log); + Loggers.useCustomLoggers(s -> spyLogger); ConnectionProvider connectionProvider = withMaxConnectionPools ? ConnectionProvider .builder("max-connection-pools") @@ -632,8 +634,6 @@ void testMaxConnectionPools(boolean withMaxConnectionPools) throws SSLException try { ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(String.class); - Logger spyLogger = Mockito.spy(log); - Loggers.useCustomLoggers(s -> spyLogger); SslContext sslServer = SslContextBuilder .forServer(ssc.certificate(), ssc.privateKey())