[ https://issues.apache.org/jira/browse/GEODE-8663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17222632#comment-17222632 ]
ASF GitHub Bot commented on GEODE-8663: --------------------------------------- sabbey37 commented on a change in pull request #5678: URL: https://github.com/apache/geode/pull/5678#discussion_r513596225 ########## File path: geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/RedisStatsIntegrationTest.java ########## @@ -16,28 +16,469 @@ import static org.assertj.core.api.Assertions.assertThat; +import java.util.concurrent.TimeUnit; + +import org.junit.Before; import org.junit.ClassRule; import org.junit.Test; +import redis.clients.jedis.BitOP; import redis.clients.jedis.Jedis; import org.apache.geode.redis.GeodeRedisServerRule; import org.apache.geode.test.awaitility.GeodeAwaitility; public class RedisStatsIntegrationTest { + public static final String EXISTING_HASH_KEY = "Existing_Hash"; + public static final String EXISTING_STRING_KEY = "Existing_String"; + public static final String EXISTING_SET_KEY_1 = "Existing_Set_1"; + public static final String EXISTING_SET_KEY_2 = "Existing_Set_2"; + public static final String NONEXISTENT_KEY = "Nonexistent_Key"; + Jedis jedis; + long initialKeyspaceHits; + long initialKeyspaceMisses; @ClassRule public static GeodeRedisServerRule server = new GeodeRedisServerRule(); + @Before + public void setup() { + jedis = new Jedis("localhost", server.getPort(), 10000000); + jedis.flushAll(); + jedis.set(EXISTING_STRING_KEY, "A_Value"); + jedis.hset(EXISTING_HASH_KEY, "Field1", "Value1"); + jedis.sadd(EXISTING_SET_KEY_1, "m1", "m2", "m3"); + jedis.sadd(EXISTING_SET_KEY_2, "m4", "m5", "m6"); + initialKeyspaceHits = server.getServer().getStats().getKeyspaceHits(); + initialKeyspaceMisses = server.getServer().getStats().getKeyspaceMisses(); + } + @Test - public void clientsStat_withConnectAndClose_isCorrect() throws InterruptedException { + public void clientsStat_withConnectAndClose_isCorrect() { long initialClients = server.getServer().getStats().getClients(); Jedis jedis = new Jedis("localhost", server.getPort(), 10000000); Review comment: I don't think this Jedis instance is necessary since we've already created one in the test setup. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > update Redis Info command To include additional statistics > ---------------------------------------------------------- > > Key: GEODE-8663 > URL: https://issues.apache.org/jira/browse/GEODE-8663 > Project: Geode > Issue Type: Improvement > Components: redis > Reporter: John Hutchison > Priority: Major > Labels: pull-request-available > -- This message was sent by Atlassian Jira (v8.3.4#803005)