use of com.netflix.conductor.jedis.JedisMock 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