use of com.hazelcast.map.impl.eviction.MapClearExpiredRecordsTask in project hazelcast by hazelcast.
the class MapExpirationManagerTest method testPrimaryDrivesEvictions_set_viaSystemProperty.
@Test
public void testPrimaryDrivesEvictions_set_viaSystemProperty() {
String previous = getProperty(PROP_PRIMARY_DRIVES_BACKUP);
try {
setProperty(PROP_PRIMARY_DRIVES_BACKUP, "False");
MapClearExpiredRecordsTask task = (MapClearExpiredRecordsTask) newExpirationManager(createHazelcastInstance()).getTask();
boolean primaryDrivesEviction = task.canPrimaryDriveExpiration();
assertFalse(primaryDrivesEviction);
} finally {
restoreProperty(PROP_PRIMARY_DRIVES_BACKUP, previous);
}
}
Aggregations