Search in sources :

Example 1 with ForsetiLockManager

use of org.neo4j.kernel.impl.enterprise.lock.forseti.ForsetiLockManager in project neo4j by neo4j.

the class SlaveLocksClientConcurrentTest method setUp.

@Before
public void setUp() {
    master = mock(Master.class, new LockedOnMasterAnswer());
    lockManager = new ForsetiLockManager(Config.defaults(), Clocks.systemClock(), ResourceTypes.values());
    requestContextFactory = mock(RequestContextFactory.class);
    availabilityGuard = new AvailabilityGuard(Clocks.systemClock(), mock(Log.class));
    when(requestContextFactory.newRequestContext(Mockito.anyInt())).thenReturn(RequestContext.anonymous(1));
}
Also used : Master(org.neo4j.kernel.ha.com.master.Master) ForsetiLockManager(org.neo4j.kernel.impl.enterprise.lock.forseti.ForsetiLockManager) RequestContextFactory(org.neo4j.kernel.ha.com.RequestContextFactory) AvailabilityGuard(org.neo4j.kernel.AvailabilityGuard) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 AvailabilityGuard (org.neo4j.kernel.AvailabilityGuard)1 RequestContextFactory (org.neo4j.kernel.ha.com.RequestContextFactory)1 Master (org.neo4j.kernel.ha.com.master.Master)1 ForsetiLockManager (org.neo4j.kernel.impl.enterprise.lock.forseti.ForsetiLockManager)1