ezoerner commented on a change in pull request #6925: URL: https://github.com/apache/geode/pull/6925#discussion_r720587122
########## File path: geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/string/MSetnxDUnitTest.java ########## @@ -0,0 +1,183 @@ +/* + * 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.string; + +import static org.apache.geode.test.dunit.rules.RedisClusterStartupRule.BIND_ADDRESS; +import static org.apache.geode.test.dunit.rules.RedisClusterStartupRule.REDIS_CLIENT_TIMEOUT; +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.List; +import java.util.concurrent.Future; +import java.util.concurrent.atomic.AtomicBoolean; + +import org.apache.logging.log4j.Logger; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Ignore; +import org.junit.Test; +import redis.clients.jedis.HostAndPort; +import redis.clients.jedis.Jedis; +import redis.clients.jedis.JedisCluster; + +import org.apache.geode.cache.control.RebalanceFactory; +import org.apache.geode.cache.control.ResourceManager; +import org.apache.geode.logging.internal.log4j.api.LogService; +import org.apache.geode.redis.ConcurrentLoopingThreads; +import org.apache.geode.test.dunit.rules.ClusterStartupRule; +import org.apache.geode.test.dunit.rules.MemberVM; +import org.apache.geode.test.dunit.rules.RedisClusterStartupRule; +import org.apache.geode.test.junit.rules.ExecutorServiceRule; + +public class MSetnxDUnitTest { + + private static final Logger logger = LogService.getLogger(); + + @ClassRule + public static RedisClusterStartupRule clusterStartUp = new RedisClusterStartupRule(4); + + @ClassRule + public static ExecutorServiceRule executor = new ExecutorServiceRule(); + + private static final String HASHTAG = "{tag}"; + private static JedisCluster jedis; + private static MemberVM server1; + private static int locatorPort; + + private static MemberVM locator; + + @BeforeClass + public static void classSetup() { + locator = clusterStartUp.startLocatorVM(0); + locatorPort = locator.getPort(); + server1 = clusterStartUp.startRedisVM(1, locatorPort); + clusterStartUp.startRedisVM(2, locatorPort); + clusterStartUp.startRedisVM(3, locatorPort); + + int redisServerPort1 = clusterStartUp.getRedisPort(1); + // Ensure that buckets are created using a connection with a fairly high timeout since + // clusterNodes does not get retried. + new Jedis(BIND_ADDRESS, redisServerPort1, REDIS_CLIENT_TIMEOUT).clusterNodes(); Review comment: This was just copied from `MSetDUnitTest`, and I'm not clear why this is needed either -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
