use of org.apache.ignite.internal.processors.cache.GridCacheUtilityKey in project ignite by apache.
the class ClusterReadOnlyModeSelfTest method testIgniteUtilityCacheAvailableForUpdatesOnReadOnlyCluster.
/**
*/
@Test
public void testIgniteUtilityCacheAvailableForUpdatesOnReadOnlyCluster() throws Exception {
IgniteEx grid = startGrid(0);
grid.cluster().state(ACTIVE_READ_ONLY);
checkClusterInReadOnlyMode(true, grid);
GridCacheUtilityKey<?> key = new GridCacheUtilityKey() {
@Override
protected boolean equalsx(GridCacheUtilityKey key) {
return false;
}
@Override
public int hashCode() {
return 0;
}
};
HashSet<String> sysTypes = GridTestUtils.getFieldValue(grid.context().marshallerContext(), "sysTypesSet");
sysTypes.add(key.getClass().getName());
grid.utilityCache().put(key, "test");
assertEquals("test", grid.utilityCache().get(key));
}
Aggregations