Search in sources :

Example 6 with GeodeRedisServer

use of org.apache.geode.redis.GeodeRedisServer in project geode by apache.

the class AuthJUnitTest method setupCacheWithPassword.

private void setupCacheWithPassword() {
    CacheFactory cf = new CacheFactory();
    cf.set(LOG_LEVEL, "error");
    cf.set(MCAST_PORT, "0");
    cf.set(LOCATORS, "");
    cf.set(ConfigurationProperties.REDIS_PASSWORD, PASSWORD);
    cache = cf.create();
    server = new GeodeRedisServer("localhost", port);
    server.start();
}
Also used : GeodeRedisServer(org.apache.geode.redis.GeodeRedisServer) CacheFactory(org.apache.geode.cache.CacheFactory)

Example 7 with GeodeRedisServer

use of org.apache.geode.redis.GeodeRedisServer in project geode by apache.

the class ListsJUnitTest method setUp.

@BeforeClass
public static void setUp() throws IOException {
    rand = new Random();
    CacheFactory cf = new CacheFactory();
    // cf.set("log-file", "redis.log");
    cf.set(LOG_LEVEL, "error");
    cf.set(MCAST_PORT, "0");
    cf.set(LOCATORS, "");
    cache = cf.create();
    port = AvailablePortHelper.getRandomAvailableTCPPort();
    server = new GeodeRedisServer("localhost", port);
    server.start();
    jedis = new Jedis("localhost", port, 10000000);
}
Also used : Jedis(redis.clients.jedis.Jedis) Random(java.util.Random) GeodeRedisServer(org.apache.geode.redis.GeodeRedisServer) CacheFactory(org.apache.geode.cache.CacheFactory) BeforeClass(org.junit.BeforeClass)

Example 8 with GeodeRedisServer

use of org.apache.geode.redis.GeodeRedisServer in project geode by apache.

the class SortedSetsJUnitTest method setUp.

@BeforeClass
public static void setUp() throws IOException {
    rand = new Random();
    CacheFactory cf = new CacheFactory();
    // cf.set("log-file", "redis.log");
    cf.set(LOG_LEVEL, "error");
    cf.set(MCAST_PORT, "0");
    cf.set(LOCATORS, "");
    cache = cf.create();
    port = AvailablePortHelper.getRandomAvailableTCPPort();
    server = new GeodeRedisServer("localhost", port);
    server.start();
    jedis = new Jedis("localhost", port, 10000000);
}
Also used : Jedis(redis.clients.jedis.Jedis) GeodeRedisServer(org.apache.geode.redis.GeodeRedisServer) CacheFactory(org.apache.geode.cache.CacheFactory) BeforeClass(org.junit.BeforeClass)

Aggregations

GeodeRedisServer (org.apache.geode.redis.GeodeRedisServer)8 CacheFactory (org.apache.geode.cache.CacheFactory)6 BeforeClass (org.junit.BeforeClass)4 Jedis (redis.clients.jedis.Jedis)4 IOException (java.io.IOException)1 Random (java.util.Random)1 ExtensionPoint (org.apache.geode.internal.cache.extension.ExtensionPoint)1 SimpleExtensionPoint (org.apache.geode.internal.cache.extension.SimpleExtensionPoint)1 IntegrationTest (org.apache.geode.test.junit.categories.IntegrationTest)1 Test (org.junit.Test)1 JedisDataException (redis.clients.jedis.exceptions.JedisDataException)1