use of com.hazelcast.internal.nearcache.impl.invalidation.RepairingHandler in project hazelcast by hazelcast.
the class ClientMapMetaDataFetcherTest method fetches_sequence_and_uuid.
@Test
public void fetches_sequence_and_uuid() throws Exception {
String mapName = "test";
int partition = 1;
long givenSequence = getInt(1, Integer.MAX_VALUE);
UUID givenUuid = UuidUtil.newSecureUUID();
RepairingTask repairingTask = getRepairingTask(mapName, partition, givenSequence, givenUuid);
MetaDataFetcher metaDataFetcher = repairingTask.getMetaDataFetcher();
ConcurrentMap<String, RepairingHandler> handlers = repairingTask.getHandlers();
metaDataFetcher.fetchMetadata(handlers);
RepairingHandler repairingHandler = handlers.get(mapName);
MetaDataContainer metaDataContainer = repairingHandler.getMetaDataContainer(partition);
UUID foundUuid = metaDataContainer.getUuid();
long foundSequence = metaDataContainer.getSequence();
assertEquals(givenSequence, foundSequence);
assertEquals(givenUuid, foundUuid);
}
Aggregations