Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,13 @@ public void testRedisConnection() {
@Test
public void testRedisConnectionInfo() {
// When
RedisConnection connection = redisTemplate.getConnectionFactory().getConnection();

try {
try (RedisConnection connection = redisTemplate.getConnectionFactory().getConnection()) {
// Then
assertThat(connection).isNotNull();
assertThat(connection.ping()).isNotNull();

System.out.println("Redis connection successful");
System.out.println("Redis ping response: " + new String(connection.ping()));
} finally {
connection.close();
System.out.println("Redis ping response: " + connection.ping());
}
}

Expand Down
Loading