Skip to content

Commit

Permalink
Merge branches 'ignite-96' and 'sprint-1' of https://git-wip-us.apach…
Browse files Browse the repository at this point in the history
…e.org/repos/asf/incubator-ignite into ignite-96

Conflicts:
	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
  • Loading branch information
Yakov Zhdanov committed Feb 9, 2015
1 parent 5f92028 commit 824eb57
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -211,9 +211,8 @@ public void testReloadAll() throws Exception {
cache.reloadAll(map.keySet());

for (Integer key : map.keySet()) {
CacheEntry entry = cache.entry(key);

if (entry.primary() || entry.backup() || nearEnabled())
if (cache.affinity().isPrimaryOrBackup(grid(caches.indexOf(cache)).localNode(), key) ||
nearEnabled())
assertEquals(map.get(key), cache.peek(key));
else
assertNull(cache.peek(key));
Expand All @@ -230,11 +229,11 @@ public void testReloadAll() throws Exception {
* @param cnt Keys count.
* @return Collection of keys for which given cache is primary.
*/
private Iterable<Integer> primaryKeysForCache(CacheProjection<Integer,String> cache, int cnt) {
private Iterable<Integer> primaryKeysForCache(GridCache<Integer,String> cache, int cnt) {
Collection<Integer> found = new ArrayList<>(cnt);

for (int i = 0; i < 10000; i++) {
if (cache.entry(i).primary()) {
if (cache.affinity().isPrimary(grid(caches.indexOf(cache)).localNode(), i)) {
found.add(i);

if (found.size() == cnt)
Expand Down

0 comments on commit 824eb57

Please sign in to comment.