[ 
https://issues.apache.org/jira/browse/GEODE-8668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17222914#comment-17222914
 ] 

ASF GitHub Bot commented on GEODE-8668:
---------------------------------------

sabbey37 commented on a change in pull request #5682:
URL: https://github.com/apache/geode/pull/5682#discussion_r514288264



##########
File path: 
geode-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/connection/SelectNativeRedisAcceptanceTest.java
##########
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ *
+ */
+
+package org.apache.geode.redis.internal.executor.connection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.rules.TestRule;
+import org.testcontainers.containers.GenericContainer;
+import redis.clients.jedis.Jedis;
+
+import org.apache.geode.test.junit.rules.IgnoreOnWindowsRule;
+
+public class SelectNativeRedisAcceptanceTest extends 
AbstractSelectIntegrationTest {
+
+  // Docker compose does not work on windows in CI. Ignore this test on windows
+  // Using a RuleChain to make sure we ignore the test before the rule comes 
into play
+  @ClassRule
+  public static TestRule ignoreOnWindowsRule = new IgnoreOnWindowsRule();
+
+  private GenericContainer<?> redisContainer;
+
+  @Before
+  public void setUp() {
+    // starting redis in cluster mode
+    redisContainer =
+        new GenericContainer<>("grokzen/redis-cluster:5.0.9")
+            .withExposedPorts(7000)
+            .withEnv("IP", "0.0.0.0");
+
+    redisContainer.start();
+    jedis = new Jedis("localhost", getPort(), REDIS_CLIENT_TIMEOUT);

Review comment:
       Good point. I just changed it to a class level method for setup and 
teardown of the Redis container so it didn't start a new container before each 
test.




----------------------------------------------------------------
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


> Implement cluster mode version of Redis SELECT command
> ------------------------------------------------------
>
>                 Key: GEODE-8668
>                 URL: https://issues.apache.org/jira/browse/GEODE-8668
>             Project: Geode
>          Issue Type: Improvement
>          Components: redis
>            Reporter: Sarah Abbey
>            Assignee: Sarah Abbey
>            Priority: Major
>              Labels: pull-request-available
>
> We are implementing SELECT because some Redis analysis tools (like Redis 
> Insight) require the SELECT command in order to function properly. Since 
> Geode Redis is similar to Redis in cluster mode in that currently it only 
> supports database zero, we emulated the behavior of SELECT in cluster mode. 
> Only database zero may be selected. All other valid DB indices (from 
> -9223372036854775807 to 9223372036854775807) return the same error as Redis 
> in Cluster mode: ERR SELECT is not allowed in cluster mode. Any DB indices 
> that cannot be parsed as a long will return the error: ERR invalid DB index



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to