Skip to content

Commit

Permalink
Address PR feedback.
Browse files Browse the repository at this point in the history
Signed-off-by: Yury-Fridlyand <[email protected]>
  • Loading branch information
Yury-Fridlyand committed Jan 25, 2024
1 parent 5de919b commit 8896eb8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
4 changes: 2 additions & 2 deletions java/integTest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ stopAllBeforeTests.finalizedBy 'clearDirs'
clearDirs.finalizedBy 'startStandalone'
clearDirs.finalizedBy 'startCluster'
test.finalizedBy 'stopAllAfterTests'
test.dependsOn ':client:buildRust'
test.dependsOn ':client:buildRustRelease'

tasks.withType(Test) {
systemProperty 'test.redis.standalone.port', '6380'
Expand All @@ -64,5 +64,5 @@ tasks.withType(Test) {
events "started", "skipped", "passed", "failed"
showStandardStreams true
}
jvmArgs "-Djava.library.path=${project.rootDir}/target/debug"
jvmArgs "-Djava.library.path=${project.rootDir}/target/release"
}
30 changes: 22 additions & 8 deletions java/integTest/src/test/java/glide/CommandTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,34 @@
import glide.api.models.configuration.RedisClientConfiguration;
import java.util.concurrent.TimeUnit;
import lombok.SneakyThrows;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

public class CommandTests {

private static RedisClient regularClient = null;

@BeforeAll
@SneakyThrows
public static void init() {
regularClient =
RedisClient.CreateClient(
RedisClientConfiguration.builder()
.address(NodeAddress.builder().port(TestConfiguration.STANDALONE_PORT).build())
.build())
.get(10, TimeUnit.SECONDS);
}

@AfterAll
@SneakyThrows
public static void deinit() {
regularClient.close();
}

@Test
@SneakyThrows
public void custom_command_info() {
var regularClient =
RedisClient.CreateClient(
RedisClientConfiguration.builder()
.address(NodeAddress.builder().port(TestConfiguration.STANDALONE_PORT).build())
.build())
.get(10, TimeUnit.SECONDS);
regularClient.customCommand(new String[] {"info"}).get();
regularClient.close();
regularClient.customCommand(new String[] {"info"}).get(10, TimeUnit.SECONDS);
}
}

0 comments on commit 8896eb8

Please sign in to comment.