use of org.apache.geode.distributed.internal.locks.DLockService in project geode by apache.
the class DistributedSystemBridgeJUnitTest method createCache.
@Before
public void createCache() throws IOException {
cache = Fakes.cache();
PersistentMemberManager memberManager = mock(PersistentMemberManager.class);
backupManager = mock(BackupManager.class);
when(cache.startBackup(any())).thenReturn(backupManager);
when(cache.getPersistentMemberManager()).thenReturn(memberManager);
when(cache.getBackupManager()).thenReturn(backupManager);
DLockService dlock = mock(DLockService.class);
when(dlock.lock(any(), anyLong(), anyLong())).thenReturn(true);
DLockService.addLockServiceForTests(BackupDataStoreHelper.LOCK_SERVICE_NAME, dlock);
GemFireCacheImpl.setInstanceForTests(cache);
}
Aggregations