use of org.infinispan.eviction.impl.ActivationManager in project infinispan by infinispan.
the class LocalConditionalCommandTest method afterMethod.
@AfterMethod
public void afterMethod() {
if (passivation) {
ActivationManager activationManager = TestingUtil.extractComponent(cache(PRIVATE_STORE_CACHE_NAME), ActivationManager.class);
// Make sure no passivations are pending, which could leak between tests
eventuallyEquals((long) 0, activationManager::getPendingActivationCount);
}
}
use of org.infinispan.eviction.impl.ActivationManager in project infinispan by infinispan.
the class ClusteredConditionalCommandTest method afterMethod.
@AfterMethod
public void afterMethod() {
if (passivation) {
for (EmbeddedCacheManager cacheManager : cacheManagers) {
ActivationManager activationManager = TestingUtil.extractComponent(cacheManager.getCache(PRIVATE_STORE_CACHE_NAME), ActivationManager.class);
// Make sure no activations are pending, which could leak between tests
eventuallyEquals((long) 0, activationManager::getPendingActivationCount);
}
}
}
use of org.infinispan.eviction.impl.ActivationManager in project infinispan by infinispan.
the class SimpleDataContainerTest method createContainer.
protected DataContainer<String, String> createContainer() {
DefaultDataContainer<String, String> dc = new DefaultDataContainer<>(16);
InternalEntryFactoryImpl internalEntryFactory = new InternalEntryFactoryImpl();
timeService = new ControlledTimeService();
TestingUtil.inject(internalEntryFactory, timeService);
ActivationManager activationManager = mock(ActivationManager.class);
InternalExpirationManager expirationManager = mock(InternalExpirationManager.class);
Mockito.when(expirationManager.entryExpiredInMemory(Mockito.any(), Mockito.anyLong(), Mockito.anyBoolean())).thenReturn(CompletableFutures.completedTrue());
TestingUtil.inject(dc, internalEntryFactory, timeService, expirationManager);
return dc;
}
Aggregations