You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/10/29 14:10:51 UTC

[GitHub] [geode] sabbey37 commented on a change in pull request #5682: GEODE-8668: Implement cluster mode version of Redis SELECT command

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:
users@infra.apache.org