# ignite-42
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/1eb8ba34 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1eb8ba34 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1eb8ba34 Branch: refs/heads/ignite-65 Commit: 1eb8ba3468c415acd26ef00202537caf2ae4e9f9 Parents: 8a6387b Author: sboikov <sboi...@gridgain.com> Authored: Tue Jan 20 17:31:43 2015 +0300 Committer: sboikov <sboi...@gridgain.com> Committed: Tue Jan 20 17:31:43 2015 +0300 ---------------------------------------------------------------------- .../cache/GridCacheAbstractFullApiSelfTest.java | 45 +++++++++++--------- ...xOriginatingNodeFailureAbstractSelfTest.java | 2 + 2 files changed, 28 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1eb8ba34/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java index 28a002c..a65b73f 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java @@ -800,15 +800,22 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract private void checkTransform(IgniteTxConcurrency concurrency, IgniteTxIsolation isolation) throws Exception { IgniteCache<String, Integer> cache = jcache(); - cache.put("key2", 1); - cache.put("key3", 3); + List<String> keys = + concurrency == OPTIMISTIC ? primaryKeysForCache(cache, 3) : Arrays.asList("key1", "key2", "key3"); + + String key1 = keys.get(0); + String key2 = keys.get(1); + String key3 = keys.get(2); + + cache.put(key2, 1); + cache.put(key3, 3); IgniteTx tx = txEnabled() ? ignite(0).transactions().txStart(concurrency, isolation) : null; try { - assertEquals("null", cache.invoke("key1", INCR_PROCESSOR)); - assertEquals("1", cache.invoke("key2", INCR_PROCESSOR)); - assertEquals("3", cache.invoke("key3", RMV_PROCESSOR)); + assertEquals("null", cache.invoke(key1, INCR_PROCESSOR)); + assertEquals("1", cache.invoke(key2, INCR_PROCESSOR)); + assertEquals("3", cache.invoke(key3, RMV_PROCESSOR)); if (tx != null) tx.commit(); @@ -823,27 +830,27 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract tx.close(); } - assertEquals((Integer)1, cache.get("key1")); - assertEquals((Integer)2, cache.get("key2")); - assertNull(cache.get("key3")); + assertEquals((Integer)1, cache.get(key1)); + assertEquals((Integer)2, cache.get(key2)); + assertNull(cache.get(key3)); for (int i = 0; i < gridCount(); i++) - assertNull("Failed for cache: " + i, cache(i).peek("key3")); + assertNull("Failed for cache: " + i, cache(i).peek(key3)); - cache.remove("key1"); - cache.put("key2", 1); - cache.put("key3", 3); + cache.remove(key1); + cache.put(key2, 1); + cache.put(key3, 3); - assertEquals("null", cache.invoke("key1", INCR_PROCESSOR)); - assertEquals("1", cache.invoke("key2", INCR_PROCESSOR)); - assertEquals("3", cache.invoke("key3", RMV_PROCESSOR)); + assertEquals("null", cache.invoke(key1, INCR_PROCESSOR)); + assertEquals("1", cache.invoke(key2, INCR_PROCESSOR)); + assertEquals("3", cache.invoke(key3, RMV_PROCESSOR)); - assertEquals((Integer)1, cache.get("key1")); - assertEquals((Integer)2, cache.get("key2")); - assertNull(cache.get("key3")); + assertEquals((Integer)1, cache.get(key1)); + assertEquals((Integer)2, cache.get(key2)); + assertNull(cache.get(key3)); for (int i = 0; i < gridCount(); i++) - assertNull(cache(i).peek("key3")); + assertNull(cache(i).peek(key3)); } /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1eb8ba34/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java index e0c0137..1a3e550 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java @@ -257,6 +257,8 @@ public abstract class IgniteTxOriginatingNodeFailureAbstractSelfTest extends Gri CacheConfiguration cfg = super.cacheConfiguration(gridName); cfg.setCacheStoreFactory(null); + cfg.setReadThrough(false); + cfg.setWriteThrough(false); return cfg; }