Ignite - Cleanup test since store single update is removed.

Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c0255c05
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c0255c05
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c0255c05

Branch: refs/heads/master
Commit: c0255c050367e88e95b2f8bb4a99cf7dd7f77037
Parents: ef04ea4
Author: Alexey Goncharuk <agoncha...@gridgain.com>
Authored: Mon Dec 8 19:10:42 2014 -0800
Committer: Alexey Goncharuk <agoncha...@gridgain.com>
Committed: Mon Dec 8 19:10:42 2014 -0800

----------------------------------------------------------------------
 .../GridCacheBasicStoreNoBatchAbstractTest.java | 251 -------------------
 ...chePartitionedBasicStoreNoBatchSelfTest.java |  25 --
 ...acheReplicatedBasicStoreNoBatchSelfTest.java |  25 --
 ...cheLocalAtomicBasicStoreNoBatchSelfTest.java |  24 --
 ...GridCacheLocalBasicStoreNoBatchSelfTest.java |  25 --
 .../bamboo/GridDataGridTestSuite.java           |   6 +-
 6 files changed, 1 insertion(+), 355 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c0255c05/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheBasicStoreNoBatchAbstractTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheBasicStoreNoBatchAbstractTest.java
 
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheBasicStoreNoBatchAbstractTest.java
deleted file mode 100644
index 910d133..0000000
--- 
a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheBasicStoreNoBatchAbstractTest.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.kernal.processors.cache;
-
-import org.apache.ignite.configuration.*;
-import org.gridgain.grid.cache.*;
-import org.apache.ignite.spi.discovery.tcp.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
-import org.gridgain.grid.util.typedef.*;
-import org.gridgain.testframework.junits.common.*;
-
-import java.util.*;
-
-import static org.gridgain.grid.cache.GridCacheAtomicityMode.*;
-
-/**
- * Test store without batch.
- */
-public abstract class GridCacheBasicStoreNoBatchAbstractTest extends 
GridCommonAbstractTest {
-    /** Cache store. */
-    private static final GridCacheTestStore store = new GridCacheTestStore();
-
-    /** Constructs a test. */
-    protected GridCacheBasicStoreNoBatchAbstractTest() {
-        super(true /*start grid. */);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void beforeTest() throws Exception {
-        store.resetTimestamp();
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTest() throws Exception {
-        GridCache<Object, Object> cache = cache();
-
-        if (cache != null)
-            cache.removeAll(F.<GridCacheEntry<Object, Object>>alwaysTrue());
-
-        store.reset();
-    }
-
-    /** @return Cache mode. */
-    protected abstract GridCacheMode cacheMode();
-
-    /** {@inheritDoc} */
-    @Override protected final IgniteConfiguration getConfiguration() throws 
Exception {
-        IgniteConfiguration c = super.getConfiguration();
-
-        TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
-        disco.setIpFinder(new TcpDiscoveryVmIpFinder(true));
-
-        c.setDiscoverySpi(disco);
-
-        GridCacheConfiguration cc = defaultCacheConfiguration();
-
-        cc.setCacheMode(cacheMode());
-
-        cc.setStore(store);
-
-        
cc.setWriteSynchronizationMode(GridCacheWriteSynchronizationMode.FULL_SYNC);
-        cc.setAtomicityMode(atomicityMode());
-
-        c.setCacheConfiguration(cc);
-
-        return c;
-    }
-
-    /**
-     * @return Cache atomicity mode.
-     */
-    protected GridCacheAtomicityMode atomicityMode() {
-        return TRANSACTIONAL;
-    }
-
-    /** @throws Exception If test fails. */
-    public void testWriteThrough() throws Exception {
-        GridCache<Integer, String> cache = cache();
-
-        Map<Integer, String> map = store.getMap();
-
-        assert map.isEmpty();
-
-        GridCacheTx tx = atomicityMode() == TRANSACTIONAL ? cache.txStart() : 
null;
-
-        try {
-            for (int i = 1; i <= 10; i++) {
-                cache.put(i, Integer.toString(i));
-
-                checkLastMethod("put");
-            }
-
-            if (tx != null) {
-                tx.commit();
-
-                checkLastMethod("put");
-            }
-        }
-        finally {
-            if (tx != null)
-                tx.close();
-        }
-
-        assert cache.size() == 10;
-
-        for (int i = 1; i <= 10; i++) {
-            String val = map.get(i);
-
-            assert val != null;
-            assert val.equals(Integer.toString(i));
-        }
-
-        store.resetLastMethod();
-
-        tx = atomicityMode() == TRANSACTIONAL ? cache.txStart() : null;
-
-        try {
-            for (int i = 1; i <= 10; i++) {
-                String val = cache.remove(i);
-
-                checkLastMethod("remove");
-
-                assert val != null;
-                assert val.equals(Integer.toString(i));
-            }
-
-            if (tx != null) {
-                tx.commit();
-
-                checkLastMethod("remove");
-            }
-        }
-        finally {
-            if (tx != null)
-                tx.close();
-        }
-
-        assert map.isEmpty();
-    }
-
-    /** @throws Exception If test failed. */
-    public void testReadThrough() throws Exception {
-        GridCache<Integer, String> cache = cache();
-
-        Map<Integer, String> map = store.getMap();
-
-        assert map.isEmpty();
-
-        if (atomicityMode() == TRANSACTIONAL) {
-            try (GridCacheTx tx = cache.txStart()) {
-                for (int i = 1; i <= 10; i++) {
-                    cache.put(i, Integer.toString(i));
-
-                    checkLastMethod("put");
-                }
-
-                tx.commit();
-
-                checkLastMethod("put");
-            }
-        }
-        else {
-            for (int i = 1; i <= 10; i++) {
-                cache.put(i, Integer.toString(i));
-
-                checkLastMethod("put");
-            }
-        }
-
-        for (int i = 1; i <= 10; i++) {
-            String val = map.get(i);
-
-            assert val != null;
-            assert val.equals(Integer.toString(i));
-        }
-
-        cache.clearAll();
-
-        assert cache.isEmpty();
-
-        assert map.size() == 10;
-
-        for (int i = 1; i <= 10; i++) {
-            // Read through.
-            String val = cache.get(i);
-
-            checkLastMethod("load");
-
-            assert val != null;
-            assert val.equals(Integer.toString(i));
-        }
-
-        assert cache.size() == 10;
-
-        cache.clearAll();
-
-        assert cache.isEmpty();
-
-        assert map.size() == 10;
-
-        Collection<Integer> keys = new ArrayList<>();
-
-        for (int i = 1; i <= 10; i++)
-            keys.add(i);
-
-        // Read through.
-        Map<Integer, String> vals = cache.getAll(keys);
-
-        checkLastMethod("loadAll");
-
-        assert vals != null;
-        assert vals.size() == 10 : "Invalid values size: " + vals.size();
-
-        for (int i = 1; i <= 10; i++) {
-            String val = vals.get(i);
-
-            assert val != null;
-            assert val.equals(Integer.toString(i));
-        }
-
-        // Write through.
-        cache.removeAll(keys);
-
-        checkLastMethod("removeAll");
-
-        assert cache.isEmpty();
-        assert cache.isEmpty();
-
-        assert map.isEmpty();
-    }
-
-    /** @param mtd Expected last method value. */
-    private void checkLastMethod(String mtd) {
-        String lastMtd = store.getLastMethod();
-
-        if (mtd == null)
-            assert lastMtd == null : "Last method must be null: " + lastMtd;
-        else {
-            assert lastMtd != null : "Last method must be not null";
-            assert lastMtd.equals(mtd) : "Last method does not match 
[expected=" + mtd + ", lastMtd=" + lastMtd + ']';
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c0255c05/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedBasicStoreNoBatchSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedBasicStoreNoBatchSelfTest.java
 
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedBasicStoreNoBatchSelfTest.java
deleted file mode 100644
index 634bdc0..0000000
--- 
a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedBasicStoreNoBatchSelfTest.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.kernal.processors.cache.distributed.near;
-
-import org.gridgain.grid.cache.*;
-import org.gridgain.grid.kernal.processors.cache.*;
-
-import static org.gridgain.grid.cache.GridCacheMode.*;
-
-/**
- * Test store with partitioned cache.
- */
-public class GridCachePartitionedBasicStoreNoBatchSelfTest extends 
GridCacheBasicStoreNoBatchAbstractTest {
-    /** {@inheritDoc} */
-    @Override protected GridCacheMode cacheMode() {
-        return PARTITIONED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c0255c05/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/GridCacheReplicatedBasicStoreNoBatchSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/GridCacheReplicatedBasicStoreNoBatchSelfTest.java
 
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/GridCacheReplicatedBasicStoreNoBatchSelfTest.java
deleted file mode 100644
index 5697240..0000000
--- 
a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/GridCacheReplicatedBasicStoreNoBatchSelfTest.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.kernal.processors.cache.distributed.replicated;
-
-import org.gridgain.grid.cache.*;
-import org.gridgain.grid.kernal.processors.cache.*;
-
-import static org.gridgain.grid.cache.GridCacheMode.*;
-
-/**
- * Test store with replicated cache.
- */
-public class GridCacheReplicatedBasicStoreNoBatchSelfTest extends 
GridCacheBasicStoreNoBatchAbstractTest {
-    /** {@inheritDoc} */
-    @Override protected GridCacheMode cacheMode() {
-        return REPLICATED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c0255c05/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalAtomicBasicStoreNoBatchSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalAtomicBasicStoreNoBatchSelfTest.java
 
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalAtomicBasicStoreNoBatchSelfTest.java
deleted file mode 100644
index f64db2a..0000000
--- 
a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalAtomicBasicStoreNoBatchSelfTest.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.kernal.processors.cache.local;
-
-import org.gridgain.grid.cache.*;
-
-import static org.gridgain.grid.cache.GridCacheAtomicityMode.*;
-
-/**
- * Tests store with local cache in atomic mode.
- */
-public class GridCacheLocalAtomicBasicStoreNoBatchSelfTest extends 
GridCacheLocalBasicStoreNoBatchSelfTest {
-    /** {@inheritDoc} */
-    @Override protected GridCacheAtomicityMode atomicityMode() {
-        return ATOMIC;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c0255c05/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalBasicStoreNoBatchSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalBasicStoreNoBatchSelfTest.java
 
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalBasicStoreNoBatchSelfTest.java
deleted file mode 100644
index 6ec2d65..0000000
--- 
a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalBasicStoreNoBatchSelfTest.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.kernal.processors.cache.local;
-
-import org.gridgain.grid.cache.*;
-import org.gridgain.grid.kernal.processors.cache.*;
-
-import static org.gridgain.grid.cache.GridCacheMode.*;
-
-/**
- * Test store with replicated cache.
- */
-public class GridCacheLocalBasicStoreNoBatchSelfTest extends 
GridCacheBasicStoreNoBatchAbstractTest {
-    /** {@inheritDoc} */
-    @Override protected GridCacheMode cacheMode() {
-        return LOCAL;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c0255c05/modules/core/src/test/java/org/gridgain/testsuites/bamboo/GridDataGridTestSuite.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/gridgain/testsuites/bamboo/GridDataGridTestSuite.java
 
b/modules/core/src/test/java/org/gridgain/testsuites/bamboo/GridDataGridTestSuite.java
index 90919e2..077c9d0 100644
--- 
a/modules/core/src/test/java/org/gridgain/testsuites/bamboo/GridDataGridTestSuite.java
+++ 
b/modules/core/src/test/java/org/gridgain/testsuites/bamboo/GridDataGridTestSuite.java
@@ -95,8 +95,6 @@ public class GridDataGridTestSuite extends TestSuite {
 //        suite.addTestSuite(GridCacheLocalProjectionSelfTest.class);
         suite.addTestSuite(GridCacheLocalAtomicProjectionSelfTest.class);
 //        suite.addTestSuite(GridCacheLocalBasicApiSelfTest.class);
-//        suite.addTestSuite(GridCacheLocalBasicStoreNoBatchSelfTest.class);
-        
suite.addTestSuite(GridCacheLocalAtomicBasicStoreNoBatchSelfTest.class);
 //        suite.addTestSuite(GridCacheLocalBasicStoreSelfTest.class);
         suite.addTestSuite(GridCacheLocalAtomicBasicStoreSelfTest.class);
 //        suite.addTestSuite(GridCacheLocalGetAndTransformStoreSelfTest.class);
@@ -118,7 +116,7 @@ public class GridDataGridTestSuite extends TestSuite {
         suite.addTestSuite(GridCachePartitionedGetSelfTest.class);
         suite.addTest(new TestSuite(GridCachePartitionedBasicApiTest.class));
         suite.addTest(new TestSuite(GridCacheNearMultiGetSelfTest.class));
-//        suite.addTest(new 
TestSuite(GridCacheNearJobExecutionSelfTest.class));
+        suite.addTest(new TestSuite(GridCacheNearJobExecutionSelfTest.class));
         suite.addTest(new 
TestSuite(GridCachePartitionedProjectionSelfTest.class));
         suite.addTest(new 
TestSuite(GridCachePartitionedOnlyProjectionSelfTest.class));
         suite.addTest(new TestSuite(GridCacheNearOneNodeSelfTest.class));
@@ -132,7 +130,6 @@ public class GridDataGridTestSuite extends TestSuite {
         suite.addTest(new 
TestSuite(GridCacheRendezvousAffinityClientSelfTest.class));
         suite.addTest(new 
TestSuite(GridCachePartitionedProjectionAffinitySelfTest.class));
         suite.addTest(new 
TestSuite(GridCachePartitionedBasicOpSelfTest.class));
-//        suite.addTest(new 
TestSuite(GridCachePartitionedBasicStoreNoBatchSelfTest.class));
         suite.addTest(new 
TestSuite(GridCachePartitionedBasicStoreSelfTest.class));
         suite.addTest(new 
TestSuite(GridCachePartitionedGetAndTransformStoreSelfTest.class));
         suite.addTest(new 
TestSuite(GridCachePartitionedAtomicGetAndTransformStoreSelfTest.class));
@@ -213,7 +210,6 @@ public class GridDataGridTestSuite extends TestSuite {
         // Replicated cache.
         suite.addTestSuite(GridCacheReplicatedBasicApiTest.class);
         suite.addTestSuite(GridCacheReplicatedBasicOpSelfTest.class);
-//        
suite.addTestSuite(GridCacheReplicatedBasicStoreNoBatchSelfTest.class);
         suite.addTestSuite(GridCacheReplicatedBasicStoreSelfTest.class);
         
suite.addTestSuite(GridCacheReplicatedGetAndTransformStoreSelfTest.class);
         
suite.addTestSuite(GridCacheReplicatedAtomicGetAndTransformStoreSelfTest.class);

Reply via email to