From 2bbad2223d0c2e57b97c8948637c01da8ff57c00 Mon Sep 17 00:00:00 2001 From: Serhii Date: Tue, 1 Oct 2024 19:46:43 +0900 Subject: [PATCH] Use redis cluter (#72) * Change docker-compose.yml to redis cluster * Adjust port mapping * Git hub action update * Jedis integration tests are using redis cluster * Update connection string on lettuce * Refactor Lettuce pooled abstraction to support cluster commands * Refactor Lettuce pooled abstraction to support cluster commands - reformat * Switch to LettuceUnified * Switch to LettuceUnified and LettuceClusterPooled * Switch tests to LettuceUnified * Update Lettuce tests * Update ports for integration-tests.yml * Update cli command for integration-tests.yml * Bump to 1.3.0 * Factory interface uses LettuceUnified * Factory interface uses LettuceUnified - remove imports * Update tests to accommodate possible delays * bump to 1.3.1 * increase timeout wanting for test containers * proper command health check command --- .github/workflows/integration-tests.yml | 6 +++--- build.gradle.kts | 2 +- .../jedis/integrationtests/SemaphoreIntegrationTest.kt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 0fdd10f..2e73be4 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -20,7 +20,7 @@ jobs: env: INITIAL_PORT: 7010 options: >- - --health-cmd "/redis-build/bin/redis-cli -p 7010 ping" + --health-cmd "redis-cli -p 7010 ping" --health-interval 10s --health-timeout 5s --health-retries 5 @@ -31,7 +31,7 @@ jobs: env: INITIAL_PORT: 7020 options: >- - --health-cmd "/redis-build/bin/redis-cli -p 7020 ping" + --health-cmd "redis-cli -p 7020 ping" --health-interval 10s --health-timeout 5s --health-retries 5 @@ -42,7 +42,7 @@ jobs: env: INITIAL_PORT: 7030 options: >- - --health-cmd "/redis-build/bin/redis-cli -p 7030 ping" + --health-cmd "redis-cli -p 7030 ping" --health-interval 10s --health-timeout 5s --health-retries 5 diff --git a/build.gradle.kts b/build.gradle.kts index 6fe4adf..e2b8779 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -18,7 +18,7 @@ plugins { allprojects { group = "com.himadieiev" - version = "1.3.0" + version = "1.3.1" repositories { mavenCentral() diff --git a/redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/integrationtests/SemaphoreIntegrationTest.kt b/redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/integrationtests/SemaphoreIntegrationTest.kt index 7d1b85e..1789cb6 100644 --- a/redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/integrationtests/SemaphoreIntegrationTest.kt +++ b/redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/integrationtests/SemaphoreIntegrationTest.kt @@ -127,7 +127,7 @@ class SemaphoreIntegrationTest { (1..maxLeases) .forEach { - assertTrue(semaphores[it - 1].lock("test", Duration.ofSeconds(1))) + assertTrue(semaphores[it - 1].lock("test", Duration.ofSeconds(2))) } val semaphores2 = mutableListOf() (1..maxLeases) @@ -147,7 +147,7 @@ class SemaphoreIntegrationTest { } runBlocking { - delay(2000) + delay(3000) } (1..maxLeases) .forEach {