Skip to content

Commit

Permalink
sp-1 fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Yakov Zhdanov committed Feb 9, 2015
1 parent 37c699b commit 5a307bc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
Expand Up @@ -3122,8 +3122,13 @@ private void checkTtl(boolean inTx, boolean oldEntry) throws Exception {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override public boolean applyx() throws IgniteCheckedException { @Override public boolean applyx() throws IgniteCheckedException {
try { try {
if (c.get(key) != null) Integer val = c.get(key);

if (val != null) {
info("Value is in cache [key=" + key + ", val=" + val + ']');

return false; return false;
}


// Get "cache" field from GridCacheProxyImpl. // Get "cache" field from GridCacheProxyImpl.
GridCacheAdapter c0 = GridTestUtils.getFieldValue(c, "cache"); GridCacheAdapter c0 = GridTestUtils.getFieldValue(c, "cache");
Expand Down Expand Up @@ -3687,11 +3692,9 @@ public void testIgniteCacheIterator() throws Exception {


assertFalse(cache.iterator().hasNext()); assertFalse(cache.iterator().hasNext());


final int SIZE = 20000;

Map<String, Integer> entries = new HashMap<>(); Map<String, Integer> entries = new HashMap<>();


for (int i = 0; i < SIZE; ++i) { for (int i = 0; i < 20000; ++i) {
cache.put(Integer.toString(i), i); cache.put(Integer.toString(i), i);


entries.put(Integer.toString(i), i); entries.put(Integer.toString(i), i);
Expand Down
Expand Up @@ -17,24 +17,22 @@


package org.apache.ignite.internal.processors.cache.distributed.near; package org.apache.ignite.internal.processors.cache.distributed.near;


import org.apache.ignite.*;
import org.apache.ignite.cache.*; import org.apache.ignite.cache.*;
import org.apache.ignite.cache.affinity.*; import org.apache.ignite.cache.affinity.*;
import org.apache.ignite.cluster.*; import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.configuration.*; import org.apache.ignite.configuration.*;
import org.apache.ignite.events.*; import org.apache.ignite.events.*;
import org.apache.ignite.internal.*;
import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.internal.util.typedef.internal.*;
import org.apache.ignite.lang.*; import org.apache.ignite.lang.*;


import java.util.*; import java.util.*;
import java.util.concurrent.atomic.*; import java.util.concurrent.atomic.*;


import static org.apache.ignite.cache.CacheMode.*; import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.cache.CachePreloadMode.*; import static org.apache.ignite.cache.CachePreloadMode.*;
import static org.apache.ignite.internal.processors.cache.GridCachePeekMode.*;
import static org.apache.ignite.events.EventType.*; import static org.apache.ignite.events.EventType.*;
import static org.apache.ignite.internal.processors.cache.GridCachePeekMode.*;


/** /**
* Multi-node tests for partitioned cache. * Multi-node tests for partitioned cache.
Expand Down Expand Up @@ -75,8 +73,8 @@ public void testPutAllRemoveAll() throws Exception {
for (int i = 0; i < size; i++) for (int i = 0; i < size; i++)
putMap.put(i, i * i); putMap.put(i, i * i);


GridCache<Object, Object> prj0 = grid(0).cache(null); IgniteCache<Object, Object> prj0 = grid(0).jcache(null);
GridCache<Object, Object> prj1 = grid(1).cache(null); IgniteCache<Object, Object> prj1 = grid(1).jcache(null);


prj0.putAll(putMap); prj0.putAll(putMap);


Expand Down

0 comments on commit 5a307bc

Please sign in to comment.