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

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

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



##########
File path: 
geode-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/pubsub/PubSubNativeRedisAcceptanceTest.java
##########
@@ -15,31 +15,14 @@
 
 package org.apache.geode.redis.internal.executor.pubsub;
 
-
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
 import org.junit.ClassRule;
-import redis.clients.jedis.Jedis;
 
 import org.apache.geode.NativeRedisTestRule;
 
-public class PubSubNativeRedisAcceptanceTest extends PubSubIntegrationTest {
+public class PubSubNativeRedisAcceptanceTest extends 
AbstractPubSubIntegrationTest {
   @ClassRule
   public static NativeRedisTestRule redis = new NativeRedisTestRule();
 
-  @BeforeClass
-  public static void setUp() {
-    subscriber = new Jedis("localhost", redis.getPort(), JEDIS_TIMEOUT);
-    publisher = new Jedis("localhost", redis.getPort(), JEDIS_TIMEOUT);
-  }
-
-  @AfterClass
-  public static void tearDown() {
-    subscriber.close();
-    publisher.close();
-  }
-
   public int getPort() {

Review comment:
       Should `@Override` be added to this method?

##########
File path: 
geode-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/pubsub/PubSubNativeRedisAcceptanceTest.java
##########
@@ -15,31 +15,14 @@
 
 package org.apache.geode.redis.internal.executor.pubsub;
 
-
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
 import org.junit.ClassRule;
-import redis.clients.jedis.Jedis;
 
 import org.apache.geode.NativeRedisTestRule;
 
-public class PubSubNativeRedisAcceptanceTest extends PubSubIntegrationTest {
+public class PubSubNativeRedisAcceptanceTest extends 
AbstractPubSubIntegrationTest {
   @ClassRule
   public static NativeRedisTestRule redis = new NativeRedisTestRule();
 
-  @BeforeClass
-  public static void setUp() {
-    subscriber = new Jedis("localhost", redis.getPort(), JEDIS_TIMEOUT);
-    publisher = new Jedis("localhost", redis.getPort(), JEDIS_TIMEOUT);
-  }
-
-  @AfterClass
-  public static void tearDown() {
-    subscriber.close();
-    publisher.close();
-  }
-
   public int getPort() {

Review comment:
       Should we add `@Override` to this method?

##########
File path: 
geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/AbstractExpireIntegrationTest.java
##########
@@ -0,0 +1,339 @@
+/*
+ * 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.key;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import redis.clients.jedis.Jedis;
+
+import org.apache.geode.test.dunit.rules.RedisPortSupplier;
+
+public abstract class AbstractExpireIntegrationTest implements 
RedisPortSupplier {
+
+  private Jedis jedis;
+  private static int REDIS_CLIENT_TIMEOUT = 10000000;

Review comment:
       This is not related to this PR, but I guess we should go through and 
make sure these timeouts are all set to 
`Math.toIntExact(GeodeAwaitility.getTimeout().toMillis());` at some point.




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


> Redis native tests should not also stand up a Geode server
> ----------------------------------------------------------
>
>                 Key: GEODE-8566
>                 URL: https://issues.apache.org/jira/browse/GEODE-8566
>             Project: Geode
>          Issue Type: Test
>          Components: redis
>            Reporter: Jens Deppe
>            Priority: Major
>              Labels: pull-request-available
>
> Our native acceptance tests currently extend from the integration tests and 
> both classes have a {{@ClassRule}} that results in both a native (container) 
> instance and a Geode instance starting up. Mostly not a problem except for 
> {{PubSubNativeAcceptanceTest}} which was not testing against native redis.



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

Reply via email to