Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.contrib.java.lang.system.RestoreSystemProperties;
import org.junit.experimental.categories.Category;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.ScanResult;
Expand All @@ -76,6 +78,9 @@ public class HashesIntegrationTest {
private static int port = 6379;
private static int ITERATION_COUNT = 4000;

@ClassRule
public static RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();

@BeforeClass
public static void setUp() throws IOException {
rand = new Random();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.contrib.java.lang.system.RestoreSystemProperties;
import redis.clients.jedis.Jedis;

import org.apache.geode.cache.CacheFactory;
Expand All @@ -39,6 +41,9 @@ public class RedisLockServiceIntegrationTest {
private static Jedis jedis;
private static int port = 6379;

@ClassRule
public static RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();

@BeforeClass
public static void setUp() {
CacheFactory cf = new CacheFactory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@

package org.apache.geode.redis.general;

import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
import static org.apache.geode.distributed.ConfigurationProperties.LOG_LEVEL;
import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
import static org.assertj.core.api.Assertions.assertThat;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import redis.clients.jedis.Jedis;

import org.apache.geode.cache.CacheFactory;
import org.apache.geode.cache.GemFireCache;
import org.apache.geode.internal.AvailablePortHelper;
import org.apache.geode.redis.GeodeRedisServer;

Expand All @@ -30,11 +35,18 @@ public class PexpireIntegrationTest {
public static Jedis jedis;
public static int REDIS_CLIENT_TIMEOUT = 10000000;
private static GeodeRedisServer server;
private static GemFireCache cache;

@BeforeClass
public static void setUp() {
int port = AvailablePortHelper.getRandomAvailableTCPPort();

CacheFactory cf = new CacheFactory();
cf.set(LOG_LEVEL, "error");
cf.set(MCAST_PORT, "0");
cf.set(LOCATORS, "");
cache = cf.create();

server = new GeodeRedisServer("localhost", port);
server.start();
jedis = new Jedis("localhost", port, REDIS_CLIENT_TIMEOUT);
Expand All @@ -43,6 +55,7 @@ public static void setUp() {
@AfterClass
public static void classLevelTearDown() {
jedis.close();
cache.close();
server.shutdown();
}

Expand Down