Skip to content

Commit

Permalink
Test: More UDS test (#3328)
Browse files Browse the repository at this point in the history
  • Loading branch information
sazzad16 authored Mar 22, 2023
1 parent fdd154e commit fe96e93
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/test/java/redis/clients/jedis/UdsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,23 @@
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;

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());
}
}

Expand Down

0 comments on commit fe96e93

Please sign in to comment.