From f9cbb19dcf71bdc5806a8626710ad96a46e93cb4 Mon Sep 17 00:00:00 2001 From: SanHalacogluImproving Date: Thu, 7 Mar 2024 11:48:18 -0800 Subject: [PATCH] Minor update to test name and ordering. --- .../glide/cluster/ClusterClientTests.java | 26 +++++++++---------- .../standalone/StandaloneClientTests.java | 24 ++++++++--------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/java/integTest/src/test/java/glide/cluster/ClusterClientTests.java b/java/integTest/src/test/java/glide/cluster/ClusterClientTests.java index fe8ae0e061..2846eace63 100644 --- a/java/integTest/src/test/java/glide/cluster/ClusterClientTests.java +++ b/java/integTest/src/test/java/glide/cluster/ClusterClientTests.java @@ -229,21 +229,9 @@ public void can_connect_with_auth_acl() { client.close(); } - @Test - @SneakyThrows - public void close_client_throws_ExecutionException_with_ClosingException_cause() { - RedisClusterClient client = - RedisClusterClient.CreateClient(commonClusterClientConfig().build()).get(); - - client.close(); - ExecutionException executionException = - assertThrows(ExecutionException.class, () -> client.set("foo", "bar").get()); - assertTrue(executionException.getCause() instanceof ClosingException); - } - @SneakyThrows @Test - public void custom_command_info() { + public void client_name() { RedisClusterClient client = RedisClusterClient.CreateClient( commonClusterClientConfig().clientName("TEST_CLIENT_NAME").build()) @@ -255,4 +243,16 @@ public void custom_command_info() { client.close(); } + + @Test + @SneakyThrows + public void close_client_throws_ExecutionException_with_ClosingException_cause() { + RedisClusterClient client = + RedisClusterClient.CreateClient(commonClusterClientConfig().build()).get(); + + client.close(); + ExecutionException executionException = + assertThrows(ExecutionException.class, () -> client.set("foo", "bar").get()); + assertTrue(executionException.getCause() instanceof ClosingException); + } } diff --git a/java/integTest/src/test/java/glide/standalone/StandaloneClientTests.java b/java/integTest/src/test/java/glide/standalone/StandaloneClientTests.java index e1927059eb..3d3eaa4e19 100644 --- a/java/integTest/src/test/java/glide/standalone/StandaloneClientTests.java +++ b/java/integTest/src/test/java/glide/standalone/StandaloneClientTests.java @@ -220,20 +220,9 @@ public void select_standalone_database_id() { client.close(); } - @Test - @SneakyThrows - public void close_client_throws_ExecutionException_with_ClosingException_cause() { - RedisClient client = RedisClient.CreateClient(commonClientConfig().build()).get(); - - client.close(); - ExecutionException executionException = - assertThrows(ExecutionException.class, () -> client.set("key", "value").get()); - assertTrue(executionException.getCause() instanceof ClosingException); - } - @SneakyThrows @Test - public void custom_command_info() { + public void client_name() { RedisClient client = RedisClient.CreateClient(commonClientConfig().clientName("TEST_CLIENT_NAME").build()).get(); @@ -242,4 +231,15 @@ public void custom_command_info() { client.close(); } + + @Test + @SneakyThrows + public void close_client_throws_ExecutionException_with_ClosingException_cause() { + RedisClient client = RedisClient.CreateClient(commonClientConfig().build()).get(); + + client.close(); + ExecutionException executionException = + assertThrows(ExecutionException.class, () -> client.set("key", "value").get()); + assertTrue(executionException.getCause() instanceof ClosingException); + } }