From 3e66c13cffea5231543e902dd9177ea39c99b499 Mon Sep 17 00:00:00 2001 From: Nipuna Ranasinghe Date: Wed, 17 Jan 2024 13:44:17 +0530 Subject: [PATCH] Migrate to the latest lettuce and reactor versions --- ballerina/tests/resources/docker/docker-compose.yml | 6 +++--- gradle.properties | 4 ++-- .../redis/connection/RedisConnectionManager.java | 2 +- .../redis/connection/RedisKeyCommandExecutor.java | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ballerina/tests/resources/docker/docker-compose.yml b/ballerina/tests/resources/docker/docker-compose.yml index 9f75b4ca..6dc62619 100644 --- a/ballerina/tests/resources/docker/docker-compose.yml +++ b/ballerina/tests/resources/docker/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.0' services: - redis-no-ssl: - image: redis:5.0.7 + redis-standalone: + image: redis:7.0.0 ports: - - "6379:6379" + - '6379:6379' diff --git a/gradle.properties b/gradle.properties index 187dc8ba..a46119b1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,11 +10,11 @@ downloadPluginVersion=5.4.0 releasePluginVersion=2.8.0 ballerinaGradlePluginVersion=2.2.0 -lettuceCoreVersion=5.1.2.RELEASE +lettuceCoreVersion=6.3.1.RELEASE commonsPool2Version=2.11.1 guavaVersion=32.0.0-jre commonsIoVersion=2.7 nettyVersion=4.1.94.Final -reactorCoreVersion=3.2.2.RELEASE +reactorCoreVersion=3.6.2 reactiveStreamsVersion=1.0.2 diff --git a/native/src/main/java/org/ballerinalang/redis/connection/RedisConnectionManager.java b/native/src/main/java/org/ballerinalang/redis/connection/RedisConnectionManager.java index 6e06a1b0..5da82b49 100644 --- a/native/src/main/java/org/ballerinalang/redis/connection/RedisConnectionManager.java +++ b/native/src/main/java/org/ballerinalang/redis/connection/RedisConnectionManager.java @@ -352,7 +352,7 @@ private StatefulConnection getStatefulRedisConnectionFromPool() throws Red } } - private Object getCommandConnection() throws RedisConnectorException { + private BaseRedisCommands getCommandConnection() throws RedisConnectorException { if (isClusterConnection()) { return getRedisClusterCommands(); } else { diff --git a/native/src/main/java/org/ballerinalang/redis/connection/RedisKeyCommandExecutor.java b/native/src/main/java/org/ballerinalang/redis/connection/RedisKeyCommandExecutor.java index 7e71c8d1..29276874 100644 --- a/native/src/main/java/org/ballerinalang/redis/connection/RedisKeyCommandExecutor.java +++ b/native/src/main/java/org/ballerinalang/redis/connection/RedisKeyCommandExecutor.java @@ -156,7 +156,7 @@ public long pTtl(K key) throws RedisConnectorException { } } - public String randomKey() throws RedisConnectorException { + public K randomKey() throws RedisConnectorException { RedisKeyCommands keyCommands = null; try { keyCommands = (RedisKeyCommands) connManager.getKeyCommandConnection();