use of redis.clients.jedis.commands.JedisCommands in project conductor by Netflix.
the class DynoQueueDAOTest method init.
@Before
public void init() {
JedisCommands jedisMock = new JedisMock();
queueDAO = new DynoQueueDAO(jedisMock, jedisMock, new ShardSupplier() {
@Override
public Set<String> getQueueShards() {
return new HashSet<>(Collections.singletonList("a"));
}
@Override
public String getCurrentShard() {
return "a";
}
@Override
public String getShardForHost(Host host) {
return "a";
}
}, new TestConfiguration());
}
use of redis.clients.jedis.commands.JedisCommands in project conductor by Netflix.
the class RedisMetadataDAOTest method init.
@Before
public void init() {
Configuration config = new TestConfiguration();
JedisCommands jedisMock = new JedisMock();
DynoProxy dynoClient = new DynoProxy(jedisMock);
redisMetadataDAO = new RedisMetadataDAO(dynoClient, objectMapper, config);
}
use of redis.clients.jedis.commands.JedisCommands in project conductor by Netflix.
the class RedisPollDataDAOTest method init.
@Before
public void init() {
Configuration config = new TestConfiguration();
JedisCommands jedisMock = new JedisMock();
DynoProxy dynoClient = new DynoProxy(jedisMock);
pollDataDAO = new RedisPollDataDAO(dynoClient, objectMapper, config);
}
use of redis.clients.jedis.commands.JedisCommands in project conductor by Netflix.
the class RedisRateLimitDaoTest method init.
@Before
public void init() {
Configuration config = new TestConfiguration();
JedisCommands jedisMock = new JedisMock();
DynoProxy dynoClient = new DynoProxy(jedisMock);
rateLimitingDao = new RedisRateLimitingDAO(dynoClient, objectMapper, config);
}
use of redis.clients.jedis.commands.JedisCommands in project conductor by Netflix.
the class MockQueueDAOModule method configureQueueDAO.
@Override
public void configureQueueDAO() {
DetachedMockFactory detachedMockFactory = new DetachedMockFactory();
JedisCommands jedisMock = new JedisMock();
ShardSupplier shardSupplier = new ShardSupplier() {
@Override
public Set<String> getQueueShards() {
return new HashSet<>(Collections.singletonList("a"));
}
@Override
public String getCurrentShard() {
return "a";
}
@Override
public String getShardForHost(Host host) {
return "a";
}
};
RedisQueues redisQueues = new RedisQueues(jedisMock, jedisMock, "mockedQueues", shardSupplier, 60000, 120000);
DynoQueueDAO dynoQueueDAO = new DynoQueueDAO(redisQueues);
bind(QueueDAO.class).toInstance(detachedMockFactory.Spy(dynoQueueDAO));
install(new WorkflowExecutorModule());
}
Aggregations