You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by je...@apache.org on 2020/06/04 17:41:47 UTC
[geode] branch develop updated: GEODE-8211: Fix flaky test by
increasing client timeout (#5213)
This is an automated email from the ASF dual-hosted git repository.
jensdeppe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new 77d4bf8 GEODE-8211: Fix flaky test by increasing client timeout (#5213)
77d4bf8 is described below
commit 77d4bf8afd7a1c715a84b03dadda6673bc36f3f4
Author: Jens Deppe <jd...@pivotal.io>
AuthorDate: Thu Jun 4 10:41:17 2020 -0700
GEODE-8211: Fix flaky test by increasing client timeout (#5213)
---
.../java/org/apache/geode/redis/GeodeRedisServerRule.java | 5 +++++
.../geode/redis/general/ShutdownIntegrationTest.java | 14 +++++---------
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/geode-redis/src/commonTest/java/org/apache/geode/redis/GeodeRedisServerRule.java b/geode-redis/src/commonTest/java/org/apache/geode/redis/GeodeRedisServerRule.java
index e7f0076..a378d6a 100644
--- a/geode-redis/src/commonTest/java/org/apache/geode/redis/GeodeRedisServerRule.java
+++ b/geode-redis/src/commonTest/java/org/apache/geode/redis/GeodeRedisServerRule.java
@@ -49,6 +49,11 @@ public class GeodeRedisServerRule extends SerializableExternalResource {
server.start();
}
+ public GeodeRedisServerRule withProperty(String property, String value) {
+ cacheFactory.set(property, value);
+ return this;
+ }
+
@Override
protected void after() {
cache.close();
diff --git a/geode-redis/src/integrationTest/java/org/apache/geode/redis/general/ShutdownIntegrationTest.java b/geode-redis/src/integrationTest/java/org/apache/geode/redis/general/ShutdownIntegrationTest.java
index 33d1470..9ef3c1a 100644
--- a/geode-redis/src/integrationTest/java/org/apache/geode/redis/general/ShutdownIntegrationTest.java
+++ b/geode-redis/src/integrationTest/java/org/apache/geode/redis/general/ShutdownIntegrationTest.java
@@ -16,12 +16,12 @@
package org.apache.geode.redis.general;
+import static org.apache.geode.distributed.ConfigurationProperties.LOG_LEVEL;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import org.junit.After;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import redis.clients.jedis.Jedis;
@@ -32,10 +32,11 @@ import org.apache.geode.redis.GeodeRedisServerRule;
public class ShutdownIntegrationTest {
public Jedis jedis;
- public static int REDIS_CLIENT_TIMEOUT = 1000;
+ public static int REDIS_CLIENT_TIMEOUT = 10000;
@Rule
- public GeodeRedisServerRule server = new GeodeRedisServerRule();
+ public GeodeRedisServerRule server = new GeodeRedisServerRule()
+ .withProperty(LOG_LEVEL, "info");
@Before
public void setUp() {
@@ -57,7 +58,6 @@ public class ShutdownIntegrationTest {
}
@Test
- @Ignore("GEODE-8211")
public void shutdownIsDisabled_whenOnlySupportedCommandsAreAllowed() {
server.getServer().setAllowUnsupportedCommands(false);
@@ -65,10 +65,6 @@ public class ShutdownIntegrationTest {
// returns an error.
jedis.shutdown();
- // the old jedis client may be closed by shutdown even though disabled on server
-
- Jedis jedis2 = new Jedis("localhost", server.getPort(), REDIS_CLIENT_TIMEOUT);
- assertThat(jedis2.keys("*")).isEmpty();
- jedis2.close();
+ assertThat(jedis.keys("*")).isEmpty();
}
}