Search in sources :

Example 1 with ZooKeeperLockFactory

use of org.zalando.nakadi.repository.zookeeper.ZooKeeperLockFactory in project nakadi by zalando.

the class ConsumerLimitingServiceAT method before.

@Before
public void before() {
    eventType = TestUtils.randomValidEventTypeName();
    client = TestUtils.randomTextString();
    final ZooKeeperHolder zkHolder = Mockito.mock(ZooKeeperHolder.class);
    when(zkHolder.get()).thenReturn(CURATOR);
    final ZooKeeperLockFactory zkLockFactory = new ZooKeeperLockFactory(zkHolder);
    limitingService = new ConsumerLimitingService(zkHolder, zkLockFactory, 5);
}
Also used : ZooKeeperLockFactory(org.zalando.nakadi.repository.zookeeper.ZooKeeperLockFactory) ConsumerLimitingService(org.zalando.nakadi.service.ConsumerLimitingService) ZooKeeperHolder(org.zalando.nakadi.repository.zookeeper.ZooKeeperHolder) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 ZooKeeperHolder (org.zalando.nakadi.repository.zookeeper.ZooKeeperHolder)1 ZooKeeperLockFactory (org.zalando.nakadi.repository.zookeeper.ZooKeeperLockFactory)1 ConsumerLimitingService (org.zalando.nakadi.service.ConsumerLimitingService)1