From 999417099dbea9a6f6dc90316a5e834f011fcb8b Mon Sep 17 00:00:00 2001 From: injectives <11927660+injectives@users.noreply.github.com> Date: Tue, 15 Mar 2022 11:53:25 +0000 Subject: [PATCH] Update dependencies (#1184) --- .../internal/async/DirectConnectionTest.java | 4 ++-- .../async/pool/ConnectionPoolImplTest.java | 4 ++-- ...eastConnectedLoadBalancingStrategyTest.java | 4 ++-- .../handlers/RoutingResponseHandlerTest.java | 10 +++++----- .../ExponentialBackoffRetryLogicTest.java | 6 +++--- .../v1/stress/AbstractStressTestBase.java | 4 ++-- pom.xml | 18 +++++++++--------- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/driver/src/test/java/org/neo4j/driver/internal/async/DirectConnectionTest.java b/driver/src/test/java/org/neo4j/driver/internal/async/DirectConnectionTest.java index 71a114db0b..638bc23f58 100644 --- a/driver/src/test/java/org/neo4j/driver/internal/async/DirectConnectionTest.java +++ b/driver/src/test/java/org/neo4j/driver/internal/async/DirectConnectionTest.java @@ -23,7 +23,6 @@ import io.netty.channel.EventLoop; import io.netty.channel.embedded.EmbeddedChannel; import io.netty.channel.pool.ChannelPool; -import io.netty.util.internal.ConcurrentSet; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; @@ -31,6 +30,7 @@ import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionStage; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; @@ -616,7 +616,7 @@ private static void assertConnectionTerminatedError( IllegalStateException e ) private static class ThreadTrackingInboundMessageDispatcher extends InboundMessageDispatcher { - final Set queueThreadNames = new ConcurrentSet<>(); + final Set queueThreadNames = ConcurrentHashMap.newKeySet(); ThreadTrackingInboundMessageDispatcher( Channel channel ) { super( channel, DEV_NULL_LOGGING ); diff --git a/driver/src/test/java/org/neo4j/driver/internal/async/pool/ConnectionPoolImplTest.java b/driver/src/test/java/org/neo4j/driver/internal/async/pool/ConnectionPoolImplTest.java index 1a12937130..f1d833b3e3 100644 --- a/driver/src/test/java/org/neo4j/driver/internal/async/pool/ConnectionPoolImplTest.java +++ b/driver/src/test/java/org/neo4j/driver/internal/async/pool/ConnectionPoolImplTest.java @@ -39,7 +39,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; import static org.mockito.Mockito.when; import static org.neo4j.driver.internal.BoltServerAddress.LOCAL_DEFAULT; import static org.neo4j.driver.internal.logging.DevNullLogging.DEV_NULL_LOGGING; @@ -59,7 +59,7 @@ void shouldDoNothingWhenRetainOnEmptyPool() pool.retainAll( singleton( LOCAL_DEFAULT ) ); - verifyZeroInteractions( nettyChannelTracker ); + verifyNoInteractions( nettyChannelTracker ); } @Test diff --git a/driver/src/test/java/org/neo4j/driver/internal/cluster/loadbalancing/LeastConnectedLoadBalancingStrategyTest.java b/driver/src/test/java/org/neo4j/driver/internal/cluster/loadbalancing/LeastConnectedLoadBalancingStrategyTest.java index c3462fccc6..04bb1e113b 100644 --- a/driver/src/test/java/org/neo4j/driver/internal/cluster/loadbalancing/LeastConnectedLoadBalancingStrategyTest.java +++ b/driver/src/test/java/org/neo4j/driver/internal/cluster/loadbalancing/LeastConnectedLoadBalancingStrategyTest.java @@ -36,7 +36,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import static org.mockito.MockitoAnnotations.initMocks; +import static org.mockito.MockitoAnnotations.openMocks; import static org.neo4j.driver.internal.cluster.ClusterCompositionUtil.A; import static org.neo4j.driver.internal.logging.DevNullLogging.DEV_NULL_LOGGING; @@ -49,7 +49,7 @@ class LeastConnectedLoadBalancingStrategyTest @BeforeEach void setUp() { - initMocks( this ); + openMocks( this ); strategy = new LeastConnectedLoadBalancingStrategy( connectionPool, DEV_NULL_LOGGING ); } diff --git a/driver/src/test/java/org/neo4j/driver/internal/handlers/RoutingResponseHandlerTest.java b/driver/src/test/java/org/neo4j/driver/internal/handlers/RoutingResponseHandlerTest.java index 529014b1bb..27470e483c 100644 --- a/driver/src/test/java/org/neo4j/driver/internal/handlers/RoutingResponseHandlerTest.java +++ b/driver/src/test/java/org/neo4j/driver/internal/handlers/RoutingResponseHandlerTest.java @@ -36,7 +36,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; import static org.neo4j.driver.internal.BoltServerAddress.LOCAL_DEFAULT; class RoutingResponseHandlerTest @@ -50,7 +50,7 @@ void shouldUnwrapCompletionException() Throwable handledError = handle( new CompletionException( error ), errorHandler ); assertEquals( error, handledError ); - verifyZeroInteractions( errorHandler ); + verifyNoInteractions( errorHandler ); } @Test @@ -86,7 +86,7 @@ void shouldHandleTransientException() Throwable handledError = handle( error, errorHandler ); assertEquals( error, handledError ); - verifyZeroInteractions( errorHandler ); + verifyNoInteractions( errorHandler ); } @Test @@ -122,7 +122,7 @@ void shouldHandleClientException() Throwable handledError = handle( error, errorHandler, AccessMode.READ ); assertEquals( error, handledError ); - verifyZeroInteractions( errorHandler ); + verifyNoInteractions( errorHandler ); } @Test @@ -158,7 +158,7 @@ private void testWriteFailureWithReadAccessMode( String code ) assertThat( handledError, instanceOf( ClientException.class ) ); assertEquals( "Write queries cannot be performed in READ access mode.", handledError.getMessage() ); - verifyZeroInteractions( errorHandler ); + verifyNoInteractions( errorHandler ); } private void testWriteFailureWithWriteAccessMode( String code ) diff --git a/driver/src/test/java/org/neo4j/driver/internal/retry/ExponentialBackoffRetryLogicTest.java b/driver/src/test/java/org/neo4j/driver/internal/retry/ExponentialBackoffRetryLogicTest.java index c6f2d47dcf..f15f2c796f 100644 --- a/driver/src/test/java/org/neo4j/driver/internal/retry/ExponentialBackoffRetryLogicTest.java +++ b/driver/src/test/java/org/neo4j/driver/internal/retry/ExponentialBackoffRetryLogicTest.java @@ -52,7 +52,7 @@ import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; import static org.mockito.Mockito.when; import static org.neo4j.driver.internal.logging.DevNullLogging.DEV_NULL_LOGGING; import static org.neo4j.driver.internal.util.Futures.failedFuture; @@ -646,7 +646,7 @@ void nothingIsLoggedOnFatalFailure() throw new RuntimeException( "Fatal blocking" ); } ) ); assertEquals( "Fatal blocking", error.getMessage() ); - verifyZeroInteractions( logger ); + verifyNoInteractions( logger ); } @Test @@ -662,7 +662,7 @@ void nothingIsLoggedOnFatalFailureAsync() await( logic.retryAsync( () -> failedFuture( new RuntimeException( "Fatal async" ) ) ) ) ); assertEquals( "Fatal async", error.getMessage() ); - verifyZeroInteractions( logger ); + verifyNoInteractions( logger ); } @Test diff --git a/driver/src/test/java/org/neo4j/driver/v1/stress/AbstractStressTestBase.java b/driver/src/test/java/org/neo4j/driver/v1/stress/AbstractStressTestBase.java index 5a86fa7efb..a1aaebfe7d 100644 --- a/driver/src/test/java/org/neo4j/driver/v1/stress/AbstractStressTestBase.java +++ b/driver/src/test/java/org/neo4j/driver/v1/stress/AbstractStressTestBase.java @@ -18,7 +18,6 @@ */ package org.neo4j.driver.v1.stress; -import io.netty.util.internal.ConcurrentSet; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -35,6 +34,7 @@ import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionStage; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; @@ -623,7 +623,7 @@ private static class ResourcesInfo private static class LoggerNameTrackingLogging implements Logging { private final Logging consoleLogging = Logging.console( Level.FINE ); - private final Set acquiredLoggerNames = new ConcurrentSet<>(); + private final Set acquiredLoggerNames = ConcurrentHashMap.newKeySet(); @Override public Logger getLog( String name ) diff --git a/pom.xml b/pom.xml index 86cc4de485..df96ae405f 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ 1.8 ${project.basedir} 2.22.1 - 5.4.0 + 5.8.2 1C parallelizableIT @@ -64,14 +64,14 @@ org.hdrhistogram HdrHistogram - 2.1.10 + 2.1.12 org.slf4j slf4j-api - 1.7.25 + 1.7.36 @@ -84,7 +84,7 @@ org.mockito mockito-core - 2.18.3 + 4.4.0 test @@ -96,31 +96,31 @@ org.rauschig jarchivelib - 0.7.1 + 1.2.0 test org.bouncycastle bcprov-jdk15on - 1.59 + 1.70 test org.bouncycastle bcpkix-jdk15on - 1.59 + 1.70 test com.fasterxml.jackson.core jackson-databind - 2.9.8 + 2.13.2 test ch.qos.logback logback-classic - 1.2.3 + 1.2.11 test