Skip to content

Commit

Permalink
Minor update to test name and ordering.
Browse files Browse the repository at this point in the history
  • Loading branch information
SanHalacogluImproving committed Mar 12, 2024
1 parent 7c6e51d commit f9cbb19
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
26 changes: 13 additions & 13 deletions java/integTest/src/test/java/glide/cluster/ClusterClientTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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);
}
}

0 comments on commit f9cbb19

Please sign in to comment.