From fe96e9349c90d1ce882c65ea23f0bbbf7c9fbc87 Mon Sep 17 00:00:00 2001 From: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com> Date: Wed, 22 Mar 2023 12:16:41 +0600 Subject: [PATCH] Test: More UDS test (#3328) --- src/test/java/redis/clients/jedis/UdsTest.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/test/java/redis/clients/jedis/UdsTest.java b/src/test/java/redis/clients/jedis/UdsTest.java index 9330c99f71..24eb898eaf 100644 --- a/src/test/java/redis/clients/jedis/UdsTest.java +++ b/src/test/java/redis/clients/jedis/UdsTest.java @@ -6,12 +6,6 @@ import org.junit.Test; import org.newsclub.net.unix.AFUNIXSocket; import org.newsclub.net.unix.AFUNIXSocketAddress; - -//import redis.clients.jedis.HostAndPort; -//import redis.clients.jedis.Jedis; -import redis.clients.jedis.UnifiedJedis; -import redis.clients.jedis.JedisSocketFactory; -import redis.clients.jedis.Protocol; import redis.clients.jedis.exceptions.JedisConnectionException; import static org.junit.Assert.assertEquals; @@ -19,9 +13,16 @@ public class UdsTest { @Test - public void testConnectsToUds() { + public void jedisConnectsToUds() { + try (Jedis jedis = new Jedis(new UdsJedisSocketFactory())) { + assertEquals("PONG", jedis.ping()); + } + } + + @Test + public void unifiedJedisConnectsToUds() { try (UnifiedJedis jedis = new UnifiedJedis(new UdsJedisSocketFactory())) { -// assertEquals("PONG", jedis.ping()); + assertEquals("PONG", jedis.ping()); } }