diff --git a/java/integTest/src/test/java/glide/SimpleTest.java b/java/integTest/src/test/java/glide/SimpleTest.java deleted file mode 100644 index ea9870a9f2..0000000000 --- a/java/integTest/src/test/java/glide/SimpleTest.java +++ /dev/null @@ -1,73 +0,0 @@ -package glide; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; - -import glide.api.ClusterClient; -import glide.api.RedisClient; -import glide.api.models.RedisValue; -import glide.api.models.configuration.NodeAddress; -import glide.api.models.configuration.RedisClientConfiguration; -import glide.api.models.configuration.RedisClusterClientConfiguration; -import glide.api.models.configuration.SimpleRoutes; -import glide.ffi.resolvers.LogLevelResolver; -import lombok.SneakyThrows; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; - -public class SimpleTest { - - @BeforeAll - public static void init() { - LogLevelResolver.setLogLevel(4); - } - - @Test - @SneakyThrows - public void standard_client() { - var client = - RedisClient.CreateClient( - RedisClientConfiguration.builder().address(NodeAddress.builder().build()).build()) - .get(); - - client.getCommandManager().set("key", "value").get(); - assertEquals("value", client.getCommandManager().get("key").get()); - } - - @Test - @SneakyThrows - public void cluster_client() { - var client = - ClusterClient.CreateClient( - RedisClusterClientConfiguration.builder() - .address(NodeAddress.builder().port(7000).build()) - .requestTimeout(5000) - .build()) - .get(); - - client.getCommandManager().set("key", "value").get(); - assertEquals("value", client.getCommandManager().get("key").get()); - - var value = client.getCommandManager().get("key", SimpleRoutes.AllNodes).get(); - assertTrue(value.hasBulkData()); - - print(value); - } - - private void print(RedisValue value) { - if (value.hasBulkData()) { - System.out.println("got a map"); - for (var entry : value.getBulkValue().entrySet()) { - System.out.printf( - "%s : %s = %s : %s%n", - entry.getKey(), - entry.getKey().getClass().getSimpleName(), - entry.getValue(), - entry.getValue().getClass().getSimpleName()); - } - } else { - System.out.println("got a string"); - System.out.println(value.getSingleValue()); - } - } -}