Search in sources :

Example 1 with RedissonCacheClientProvider

use of org.killbill.billing.util.glue.RedissonCacheClientProvider in project killbill by killbill.

the class GuicyKillbillTestSuite method globalBeforeSuite.

@BeforeSuite(alwaysRun = true)
public void globalBeforeSuite() {
    extraPropertiesForTestSuite.put("org.killbill.security.shiroResourcePath", "classpath:org/killbill/billing/util/shiro.ini");
    if (Boolean.valueOf(System.getProperty("killbill.test.redis", "false"))) {
        redisServer = new RedisServer(56379);
        redisServer.start();
        redissonClient = new RedissonCacheClientProvider("redis://127.0.0.1:56379", 1, null).get();
        theRealClock = new DistributedClockMock();
        ((DistributedClockMock) theRealClock).setRedissonClient(redissonClient);
        extraPropertiesForTestSuite.put("org.killbill.cache.config.redis", "true");
        extraPropertiesForTestSuite.put("org.killbill.cache.config.redis.url", "redis://127.0.0.1:56379");
    } else {
        theRealClock.resetDeltaFromReality();
    }
    // The clock needs to be setup early in @BeforeSuite, as it is needed when starting the server, but see below
    clock = theRealClock;
}
Also used : RedisServer(redis.embedded.RedisServer) RedissonCacheClientProvider(org.killbill.billing.util.glue.RedissonCacheClientProvider) DistributedClockMock(org.killbill.clock.DistributedClockMock) BeforeSuite(org.testng.annotations.BeforeSuite)

Aggregations

RedissonCacheClientProvider (org.killbill.billing.util.glue.RedissonCacheClientProvider)1 DistributedClockMock (org.killbill.clock.DistributedClockMock)1 BeforeSuite (org.testng.annotations.BeforeSuite)1 RedisServer (redis.embedded.RedisServer)1