EmbeddedRedis() throws IOException, URISyntaxException { redisServer = new RedisServer(); }
@Override protected void before() throws IOException { try { this.server = new RedisServer(this.port); this.server.start(); } catch (Exception e) { if (!suppressExceptions) { throw e; } } }
@BeforeSuite(alwaysRun = true) public void globalBeforeSuite() { 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).get(); theRealClock = new DistributedClockMock(); ((DistributedClockMock) theRealClock).setRedissonClient(redissonClient); extraPropertiesForTestSuite = ImmutableMap.<String, String>of("org.killbill.cache.config.redis", "true", "org.killbill.cache.config.redis.url", "redis://127.0.0.1:56379"); } else { theRealClock.resetDeltaFromReality(); extraPropertiesForTestSuite = ImmutableMap.<String, String>of(); } // The clock needs to be setup early in @BeforeSuite, as it is needed when starting the server, but see below clock = theRealClock; }
@PostConstruct public void setUp() throws IOException { this.redisServer = new RedisServer(DEFAULT_PORT); if (available(DEFAULT_PORT)) { this.redisServer.start(); } }
@PostConstruct public void setUp() throws IOException { this.redisServer = new RedisServer(DEFAULT_PORT); if (available(DEFAULT_PORT)) { this.redisServer.start(); } }
@BeforeMethod public void setUp(final Method testMethod) throws Exception { redisProvided = Boolean.parseBoolean(System.getProperty("redis.provided", "false")); redisPort = Integer.parseInt(System.getProperty("redis.port", "16379")); if (!redisProvided) { embeddedRedisServer = new RedisServer(redisPort); embeddedRedisServer.start(); } }
@BeforeMethod public void setUp(final Method testMethod) throws Throwable { redisProvided = Boolean.parseBoolean(System.getProperty("redis.provided", "false")); final int redisPort = Integer.parseInt(System.getProperty("redis.port", "16379")); if (!redisProvided) { embeddedRedisServer = new RedisServer(redisPort); embeddedRedisServer.start(); } try { System.setProperty( "org.apache.catalina.startup.EXIT_ON_INIT_FAILURE", "true" ); _tomcat1 = getTestUtils().tomcatBuilder().port(_portTomcat1).memcachedNodes("redis://localhost:"+ redisPort) .sticky(true).buildAndStart(); } catch ( final Throwable e ) { LOG.error( "could not start tomcat.", e ); throw e; } redisClient = new BinaryJedis("localhost", redisPort); transcoderService = new TranscoderService(new JavaSerializationTranscoder(_tomcat1.getManager())); }
EmbeddedRedis() throws IOException, URISyntaxException { redisServer = new RedisServer(); }
public RedisServer build() { tryResolveConfAndExec(); List<String> args = buildCommandArgs(); return new RedisServer(args, port); }
public RedisServer build() { tryResolveConfAndExec(); List<String> args = buildCommandArgs(); return new RedisServer(args, port); }
public RedisServer build() { tryResolveConfAndExec(); List<String> args = buildCommandArgs(); return new RedisServer(args, port); }
@PostConstruct public void init() throws IOException { logger.info("Enabled Dew Test"); redisServer = new RedisServer(); if (!redisServer.isActive()) { try { redisServer.start(); redisTemplate.getConnectionFactory().getConnection(); } catch (Exception e) { logger.error("Start embedded redis error.", e); } } }
@BeforeClass static public void startRedis() throws Exception { System.out.println("Creating redis server on port: " + PORT); server = new RedisServer(PORT); System.out.println("Created embedded redis server on port " + PORT); server.start(); }
@BeforeClass static public void startRedis() throws Exception { System.out.println("Creating redis server on port: " + DEFAULT_PORT); server = new RedisServer(DEFAULT_PORT); System.out.println("Created embedded redis server on port " + DEFAULT_PORT); server.start(); }
@BeforeClass static public void startRedis() throws Exception { System.out.println("Creating redis server on port: " + DEFAULT_PORT); server = new RedisServer(DEFAULT_PORT); System.out.println("Created embedded redis server on port " + DEFAULT_PORT); server.start(); }
@BeforeClass static public void startRedis() throws Exception { System.out.println("Creating redis server on port: " + PORT); server = new RedisServer(PORT); System.out.println("Created embedded redis server on port " + PORT); server.start(); }
@BeforeClass static public void startRedis() throws Exception { server = new RedisServer(6379); System.out.println("Created embedded redis server on port 6379"); server.start(); }
@PostConstruct public void startRedis() throws IOException { if (WINDOWS == getOS()) { redisServer = RedisServer.builder().setting("maxheap 512Mb").port(redisPort).build(); } else { redisServer = new RedisServer(redisPort); } redisServer.start(); }
@Before public void setUp(TestContext tc) throws IOException { vertx = Vertx.vertx(); vertx.exceptionHandler(tc.exceptionHandler()); redisServer = new RedisServer(6379); redisServer.start(); testRedisClient = RedisClient.create(vertx, new RedisOptions().setHost("localhost").setPort(6379)); }
@Before public void setUp(TestContext tc) throws IOException { vertx = Vertx.vertx(); vertx.exceptionHandler(tc.exceptionHandler()); redisServer = new RedisServer(6379); redisServer.start(); testRedisClient = RedisClient.create(vertx, new RedisOptions().setHost("localhost").setPort(6379)); }