IGNITE-721 - Restoring test.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/bf7b9f86 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/bf7b9f86 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/bf7b9f86 Branch: refs/heads/ignite-sprint-3 Commit: bf7b9f861add6a9bf73513066938fc49384ad381 Parents: c0085a3 Author: Alexey Goncharuk <agoncha...@gridgain.com> Authored: Sat Apr 11 00:47:00 2015 -0700 Committer: Alexey Goncharuk <agoncha...@gridgain.com> Committed: Sat Apr 11 00:47:00 2015 -0700 ---------------------------------------------------------------------- .../IgniteFairAffinityDynamicCacheSelfTest.java | 36 +++++++++----------- 1 file changed, 17 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7b9f86/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/IgniteFairAffinityDynamicCacheSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/IgniteFairAffinityDynamicCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/IgniteFairAffinityDynamicCacheSelfTest.java index 90571a4..18b77e0 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/IgniteFairAffinityDynamicCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/IgniteFairAffinityDynamicCacheSelfTest.java @@ -70,30 +70,28 @@ public class IgniteFairAffinityDynamicCacheSelfTest extends GridCommonAbstractTe * @throws Exception If failed. */ public void testStartStopCache() throws Exception { - for (int k = 0; k < 10; k++) { - CacheConfiguration<Integer, Integer> cacheCfg = new CacheConfiguration<>(); + CacheConfiguration<Integer, Integer> cacheCfg = new CacheConfiguration<>(); - cacheCfg.setCacheMode(CacheMode.PARTITIONED); - cacheCfg.setAtomicityMode(CacheAtomicityMode.ATOMIC); - cacheCfg.setBackups(1); - cacheCfg.setName("test"); - cacheCfg.setAffinity(new FairAffinityFunction()); + cacheCfg.setCacheMode(CacheMode.PARTITIONED); + cacheCfg.setAtomicityMode(CacheAtomicityMode.ATOMIC); + cacheCfg.setBackups(1); + cacheCfg.setName("test"); + cacheCfg.setAffinity(new FairAffinityFunction()); - final IgniteCache<Integer, Integer> cache = ignite(0).createCache(cacheCfg); + final IgniteCache<Integer, Integer> cache = ignite(0).createCache(cacheCfg); - for (int i = 0; i < 10_000; i++) - cache.put(i, i); + for (int i = 0; i < 10_000; i++) + cache.put(i, i); - IgniteInternalFuture<Object> destFut = GridTestUtils.runAsync(new Callable<Object>() { - @Override - public Object call() throws Exception { - ignite(0).destroyCache(cache.getName()); + IgniteInternalFuture<Object> destFut = GridTestUtils.runAsync(new Callable<Object>() { + @Override + public Object call() throws Exception { + ignite(0).destroyCache(cache.getName()); - return null; - } - }); + return null; + } + }); - destFut.get(2000L); - } + destFut.get(2000L); } }