Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MapProxySupport's loadInternal method requires dataKeys #7090

hasancelik opened this issue Dec 17, 2015 · 0 comments


None yet
1 participant
Copy link

commented Dec 17, 2015

I found this bug when i was trying to increase code coverage of NearCachedMapProxyImpl. Line that test calls map.loadAll threw ClassCastException due to NearCachedMapProxyImpl's invalidateCache.

Test is not directly related to bug it calls problematic methods.

    public void testAfterLoadInvalidateNearCache() {
        int mapSize = 100;
        String mapName = "testLoad";

        Config config = createNearCachedMapConfig(mapName);
        MapStoreTest.SimpleMapStore store = new MapStoreTest.SimpleMapStore();
        MapStoreConfig mapStoreConfig = new MapStoreConfig();

        HazelcastInstance instance = createHazelcastInstance(config);

        IMap<Integer, Integer> map = instance.getMap(mapName);
        HashSet<Integer> keys = new HashSet<Integer>();
        for (int i = 0; i < mapSize; i++) {
            map.put(i, i);

        for (int i = 0; i < mapSize; i++) {

        map.loadAll(keys, true);

        NearCacheStats nearCacheStats = map.getLocalMapStats().getNearCacheStats();
        assertEquals(0, nearCacheStats.getOwnedEntryCount());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.