Search in sources :

Example 1 with MapClearExpiredRecordsTask

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);
    }
}
Also used : MapClearExpiredRecordsTask(com.hazelcast.map.impl.eviction.MapClearExpiredRecordsTask) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

MapClearExpiredRecordsTask (com.hazelcast.map.impl.eviction.MapClearExpiredRecordsTask)1 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 Test (org.junit.Test)1