From f0b057797c42756bf14998cf7b0e4625ce33e691 Mon Sep 17 00:00:00 2001 From: Eugene R Date: Wed, 23 Aug 2023 12:11:48 +0300 Subject: [PATCH] Upgrade Java client to 7.1.0; update Gradle dependencies (#226) --- build.gradle.kts | 21 ++++++++++--------- .../com/aerospike/skyhook/ScanCommandsTest.kt | 5 +++-- .../skyhook/SkyhookIntegrationTestBase.kt | 4 ++-- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 0e7b815..988ea29 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { java application - kotlin("jvm") version "1.8.10" + kotlin("jvm") version "1.9.0" id("com.github.johnrengelman.shadow") version "7.1.2" id("nebula.ospackage") version "9.1.1" } @@ -30,30 +30,31 @@ tasks.withType { } // Common dependency versions. -extra["nettyVersion"] = "4.1.89.Final" -extra["logbackVersion"] = "1.3.5" -extra["jacksonVersion"] = "2.14.2" +extra["nettyVersion"] = "4.1.96.Final" +extra["logbackVersion"] = "1.3.11" // latest for JDK 8 +extra["jacksonVersion"] = "2.15.2" +extra["junitVersion"] = "5.10.0" dependencies { - implementation("com.aerospike:aerospike-client:6.1.7") + implementation("com.aerospike:aerospike-client:7.1.0") implementation("io.netty:netty-all:${project.extra["nettyVersion"]}") implementation("io.netty:netty-codec-redis:${project.extra["nettyVersion"]}") implementation("com.google.inject:guice:5.1.0") implementation("io.github.microutils:kotlin-logging:3.0.5") implementation("ch.qos.logback:logback-classic:${project.extra["logbackVersion"]}") implementation("ch.qos.logback:logback-core:${project.extra["logbackVersion"]}") - implementation("info.picocli:picocli:4.7.1") - implementation("commons-io:commons-io:2.11.0") + implementation("info.picocli:picocli:4.7.4") + implementation("commons-io:commons-io:2.13.0") implementation("com.fasterxml.jackson.core:jackson-core:${project.extra["jacksonVersion"]}") implementation("com.fasterxml.jackson.core:jackson-annotations:${project.extra["jacksonVersion"]}") implementation("com.fasterxml.jackson.core:jackson-databind:${project.extra["jacksonVersion"]}") implementation("com.fasterxml.jackson.module:jackson-module-kotlin:${project.extra["jacksonVersion"]}") implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${project.extra["jacksonVersion"]}") - implementation("com.google.guava:guava:31.1-jre") + implementation("com.google.guava:guava:32.1.2-jre") testImplementation(kotlin("test-junit5")) - testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.2") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.2") + testImplementation("org.junit.jupiter:junit-jupiter-api:${project.extra["junitVersion"]}") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${project.extra["junitVersion"]}") } tasks.test { diff --git a/src/test/kotlin/com/aerospike/skyhook/ScanCommandsTest.kt b/src/test/kotlin/com/aerospike/skyhook/ScanCommandsTest.kt index ce445b0..aaa62f6 100644 --- a/src/test/kotlin/com/aerospike/skyhook/ScanCommandsTest.kt +++ b/src/test/kotlin/com/aerospike/skyhook/ScanCommandsTest.kt @@ -2,6 +2,7 @@ package com.aerospike.skyhook import com.aerospike.skyhook.command.RedisCommand import org.junit.jupiter.api.Test +import kotlin.test.assertContains import kotlin.test.assertEquals class ScanCommandsTest() : SkyhookIntegrationTestBase() { @@ -87,7 +88,7 @@ class ScanCommandsTest() : SkyhookIntegrationTestBase() { writeCommand("${RedisCommand.KEYS.name} k1*") Thread.sleep(5000) val r = readStringArray() - assertEquals("k11", r[0]) - assertEquals("k1", r[1]) + assertContains(r, "k11") + assertContains(r, "k1") } } diff --git a/src/test/kotlin/com/aerospike/skyhook/SkyhookIntegrationTestBase.kt b/src/test/kotlin/com/aerospike/skyhook/SkyhookIntegrationTestBase.kt index 1f1c43b..e0a2c67 100644 --- a/src/test/kotlin/com/aerospike/skyhook/SkyhookIntegrationTestBase.kt +++ b/src/test/kotlin/com/aerospike/skyhook/SkyhookIntegrationTestBase.kt @@ -39,7 +39,7 @@ abstract class SkyhookIntegrationTestBase { @JvmStatic protected val nullString = "" private const val eol = "\r\n" - private const val sleepMillis = 50L + private const val sleepMillis = 100L } @AfterEach @@ -76,7 +76,7 @@ abstract class SkyhookIntegrationTestBase { } protected fun aeroBin(bin: Any): Bin { - return Bin(config.bin, bin) + return Bin(config.bin, Value.get(bin)) } protected fun writeCommand(command: RedisCommand, args: String) {