public void TestRedisConnection() { Jedis jedis = new Jedis(REDIS_HOST, REDIS_PORT); if (!REDIS_PASSWORD.Equals("")) { jedis.auth(REDIS_PASSWORD); } try { string response = jedis.ping(); Debug.Assert(response.Equals("PONG")); } catch (JedisException e) { Console.WriteLine(e.StackTrace); } finally { jedis.close(); } }

public void testRedisConnection Jedis jedis = new JedisREDIS_HOST REDIS_PORT; if !REDIS_PASSWORDequals jedisauthREDIS_PASSWORD; try String response = jedisping; assert responseequalsPONG; catch JedisException e eprintStackTrace; finally jedisclose; 翻译为c#

原文地址: http://www.cveoy.top/t/topic/GDo 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录