ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [22/50] [abbrv] incubator-ignite git commit: # ignite-42
Date Thu, 22 Jan 2015 15:02:53 GMT
# 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/f4da39a5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f4da39a5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f4da39a5

Branch: refs/heads/ignite-36
Commit: f4da39a5b48a46d24417238565a737dc84722e09
Parents: ed72ac1
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Jan 21 14:18:42 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Jan 21 14:21:13 2015 +0300

----------------------------------------------------------------------
 .../transactions/IgniteTxLocalAdapter.java      |  14 +
 .../IgniteCacheEntryListenerAbstractTest.java   |   2 +-
 ...IgniteCacheAtomicLocalNoReadThroughTest.java |  49 ++++
 ...CacheAtomicNearEnabledNoReadThroughTest.java |  32 +++
 .../IgniteCacheAtomicNoReadThroughTest.java     |  35 ++-
 .../IgniteCacheNoReadThroughAbstractTest.java   | 272 ++++++++++++++++++-
 .../IgniteCacheTxLocalNoReadThroughTest.java    |  49 ++++
 ...niteCacheTxNearEnabledNoReadThroughTest.java |  32 +++
 .../IgniteCacheTxNoReadThroughTest.java         |  49 ++++
 .../bamboo/GridDataGridTestSuite.java           |   7 +
 10 files changed, 536 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f4da39a5/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxLocalAdapter.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxLocalAdapter.java
index 11cd1af..06ee6b0 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -312,6 +312,13 @@ public abstract class IgniteTxLocalAdapter<K, V> extends IgniteTxAdapter<K,
V>
     ) {
         if (!async) {
             try {
+                if (!cacheCtx.readThrough()) {
+                    for (K key : keys)
+                        c.apply(key, null);
+
+                    return new GridFinishedFuture<>(cctx.kernalContext(), false);
+                }
+
                 return new GridFinishedFuture<>(cctx.kernalContext(),
                     cacheCtx.store().loadAllFromStore(this, keys, c));
             }
@@ -323,6 +330,13 @@ public abstract class IgniteTxLocalAdapter<K, V> extends IgniteTxAdapter<K,
V>
             return cctx.kernalContext().closure().callLocalSafe(
                 new GPC<Boolean>() {
                     @Override public Boolean call() throws Exception {
+                        if (!cacheCtx.readThrough()) {
+                            for (K key : keys)
+                                c.apply(key, null);
+
+                            return false;
+                        }
+
                         return cacheCtx.store().loadAllFromStore(IgniteTxLocalAdapter.this,
keys, c);
                     }
                 },

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f4da39a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
index f8927ad..7d3e2c9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
@@ -842,7 +842,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
     }
 
     /**
-     * @return Value for configuration property {@link GridCacheConfiguration#isEagerTtl()}.
+     * @return Value for configuration property {@link CacheConfiguration#isEagerTtl()}.
      */
     protected boolean eagerTtl() {
         return true;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f4da39a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheAtomicLocalNoReadThroughTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheAtomicLocalNoReadThroughTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheAtomicLocalNoReadThroughTest.java
new file mode 100644
index 0000000..2a87d10
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheAtomicLocalNoReadThroughTest.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.integration;
+
+import org.gridgain.grid.cache.*;
+
+import static org.gridgain.grid.cache.GridCacheAtomicityMode.*;
+import static org.gridgain.grid.cache.GridCacheDistributionMode.*;
+import static org.gridgain.grid.cache.GridCacheMode.*;
+
+/**
+ *
+ */
+public class IgniteCacheAtomicLocalNoReadThroughTest extends IgniteCacheNoReadThroughAbstractTest
{
+    /** {@inheritDoc} */
+    @Override protected int gridCount() {
+        return 1;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected GridCacheMode cacheMode() {
+        return LOCAL;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected GridCacheAtomicityMode atomicityMode() {
+        return ATOMIC;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected GridCacheDistributionMode distributionMode() {
+        return PARTITIONED_ONLY;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f4da39a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheAtomicNearEnabledNoReadThroughTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheAtomicNearEnabledNoReadThroughTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheAtomicNearEnabledNoReadThroughTest.java
new file mode 100644
index 0000000..04bffe8
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheAtomicNearEnabledNoReadThroughTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.integration;
+
+import org.gridgain.grid.cache.*;
+
+import static org.gridgain.grid.cache.GridCacheDistributionMode.*;
+
+/**
+ *
+ */
+public class IgniteCacheAtomicNearEnabledNoReadThroughTest extends IgniteCacheAtomicNoReadThroughTest
{
+    /** {@inheritDoc} */
+    @Override protected GridCacheDistributionMode distributionMode() {
+        return NEAR_PARTITIONED;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f4da39a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheAtomicNoReadThroughTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheAtomicNoReadThroughTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheAtomicNoReadThroughTest.java
index bd6bef4..11811d4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheAtomicNoReadThroughTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheAtomicNoReadThroughTest.java
@@ -17,8 +17,39 @@
 
 package org.apache.ignite.internal.processors.cache.integration;
 
+import org.gridgain.grid.cache.*;
+
+import static org.gridgain.grid.cache.GridCacheAtomicWriteOrderMode.*;
+import static org.gridgain.grid.cache.GridCacheAtomicityMode.*;
+import static org.gridgain.grid.cache.GridCacheDistributionMode.*;
+import static org.gridgain.grid.cache.GridCacheMode.*;
+
 /**
- * TODO
+ *
  */
-public class IgniteCacheAtomicNoReadThroughTest {
+public class IgniteCacheAtomicNoReadThroughTest extends IgniteCacheNoReadThroughAbstractTest
{
+    /** {@inheritDoc} */
+    @Override protected int gridCount() {
+        return 3;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected GridCacheMode cacheMode() {
+        return PARTITIONED;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected GridCacheAtomicityMode atomicityMode() {
+        return ATOMIC;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected GridCacheDistributionMode distributionMode() {
+        return PARTITIONED_ONLY;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected GridCacheAtomicWriteOrderMode atomicWriteOrderMode() {
+        return PRIMARY;
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f4da39a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoReadThroughAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoReadThroughAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoReadThroughAbstractTest.java
index 0284b26..7087934 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoReadThroughAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheNoReadThroughAbstractTest.java
@@ -17,8 +17,276 @@
 
 package org.apache.ignite.internal.processors.cache.integration;
 
+import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.store.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.transactions.*;
+import org.gridgain.grid.cache.*;
+import org.gridgain.grid.util.typedef.*;
+
+import javax.cache.integration.*;
+import javax.cache.processor.*;
+import java.util.*;
+
+import static org.gridgain.grid.cache.GridCacheAtomicityMode.*;
+import static org.gridgain.grid.cache.GridCacheMode.*;
+
 /**
- * TODO
+ *
  */
-public class IgniteCacheNoReadThroughAbstractTest {
+public abstract class IgniteCacheNoReadThroughAbstractTest extends IgniteCacheAbstractTest
{
+    /** */
+    private Integer lastKey = 0;
+
+    /** */
+    private boolean allowLoad;
+
+    /** {@inheritDoc} */
+    @Override protected CacheStore<?, ?> cacheStore() {
+        return new TestStore() {
+            @Override public void loadCache(IgniteBiInClosure<Object, Object> clo,
Object... args) {
+                if (!allowLoad)
+                    fail();
+
+                super.loadCache(clo, args);
+            }
+
+            @Override public Object load(Object key) {
+                if (!allowLoad)
+                    fail();
+
+                return super.load(key);
+            }
+
+            @Override public Map<Object, Object> loadAll(Iterable<?> keys) {
+                if (!allowLoad)
+                    fail();
+
+                return super.loadAll(keys);
+            }
+        };
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        cfg.getTransactionsConfiguration().setTxSerializableEnabled(true);
+
+        return cfg;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected CacheConfiguration cacheConfiguration(String gridName) throws Exception
{
+        CacheConfiguration ccfg = super.cacheConfiguration(gridName);
+
+        ccfg.setReadThrough(false);
+
+        ccfg.setWriteThrough(true);
+
+        return ccfg;
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testNoReadThrough() throws Exception {
+        IgniteCache<Integer, Integer> cache = jcache(0);
+
+        for (Integer key : keys()) {
+            log.info("Test [key=" + key + ']');
+
+            storeMap.put(key, key);
+
+            assertNull(cache.get(key));
+
+            assertEquals(key, storeMap.get(key));
+
+            assertNull(cache.getAndPut(key, -1));
+
+            assertEquals(-1, storeMap.get(key));
+
+            cache.remove(key);
+
+            assertNull(storeMap.get(key));
+
+            storeMap.put(key, key);
+
+            assertTrue(cache.putIfAbsent(key, -1));
+
+            assertEquals(-1, storeMap.get(key));
+
+            cache.remove(key);
+
+            assertNull(storeMap.get(key));
+
+            storeMap.put(key, key);
+
+            assertNull(cache.getAndRemove(key));
+
+            assertNull(storeMap.get(key));
+
+            storeMap.put(key, key);
+
+            assertNull(cache.getAndPutIfAbsent(key, -1));
+
+            assertEquals(-1, storeMap.get(key));
+
+            cache.remove(key);
+
+            assertNull(storeMap.get(key));
+
+            storeMap.put(key, key);
+
+            Object ret = cache.invoke(key, new EntryProcessor<Integer, Integer, Object>()
{
+                @Override public Object process(MutableEntry<Integer, Integer> e, Object...
args) {
+                    Integer val = e.getValue();
+
+                    assertFalse(e.exists());
+
+                    assertNull(val);
+
+                    e.setValue(-1);
+
+                    return String.valueOf(val);
+                }
+            });
+
+            assertEquals("null", ret);
+
+            assertEquals(-1, storeMap.get(key));
+
+            cache.remove(key);
+
+            assertNull(storeMap.get(key));
+
+            storeMap.put(key, key);
+
+            assertFalse(cache.replace(key, -1));
+
+            assertEquals(key, storeMap.get(key));
+
+            assertNull(cache.getAndReplace(key, -1));
+
+            assertEquals(key, storeMap.get(key));
+
+            assertFalse(cache.replace(key, key, -1));
+
+            assertEquals(key, storeMap.get(key));
+        }
+
+        Set<Integer> keys = new HashSet<>();
+
+        for (int i = 1000_0000; i < 1000_0000 + 1000; i++) {
+            keys.add(i);
+
+            storeMap.put(i, i);
+        }
+
+        assertTrue(cache.getAll(keys).isEmpty());
+
+        if (atomicityMode() == TRANSACTIONAL) {
+            for (IgniteTxConcurrency concurrency : IgniteTxConcurrency.values()) {
+                for (IgniteTxIsolation isolation : IgniteTxIsolation.values()) {
+                    for (Integer key : keys()) {
+                        log.info("Test tx [key=" + key +
+                            ", concurrency=" + concurrency +
+                            ", isolation=" + isolation + ']');
+
+                        storeMap.put(key, key);
+
+                        try (IgniteTx tx = ignite(0).transactions().txStart(concurrency,
isolation)) {
+                            assertNull(cache.get(key));
+
+                            tx.commit();
+                        }
+
+                        assertEquals(key, storeMap.get(key));
+
+                        try (IgniteTx tx = ignite(0).transactions().txStart(concurrency,
isolation)) {
+                            assertNull(cache.getAndPut(key, -1));
+
+                            tx.commit();
+                        }
+
+                        assertEquals(-1, storeMap.get(key));
+
+                        cache.remove(key);
+
+                        assertNull(storeMap.get(key));
+
+                        storeMap.put(key, key);
+
+                        try (IgniteTx tx = ignite(0).transactions().txStart(concurrency,
isolation)) {
+                            assertTrue(cache.putIfAbsent(key, -1));
+
+                            tx.commit();
+                        }
+
+                        assertEquals(-1, storeMap.get(key));
+
+                        try (IgniteTx tx = ignite(0).transactions().txStart(concurrency,
isolation)) {
+                            assertTrue(cache.getAll(keys).isEmpty());
+
+                            tx.commit();
+                        }
+                    }
+                }
+            }
+        }
+
+        // Check
+
+        allowLoad = true;
+
+        Integer key = 1;
+
+        cache.remove(key);
+
+        storeMap.clear();
+
+        storeMap.put(key, 10);
+
+        cache.loadCache(null);
+
+        assertEquals(10, (int)cache.get(key));
+
+        cache.remove(key);
+
+        storeMap.put(key, 11);
+
+        CompletionListenerFuture fut = new CompletionListenerFuture();
+
+        cache.loadAll(F.asSet(key), true, fut);
+
+        fut.get();
+
+        assertEquals(11, (int)cache.get(key));
+    }
+
+    /**
+     * @return Test keys.
+     * @throws Exception If failed.
+     */
+    protected Collection<Integer> keys() throws Exception {
+        GridCache<Integer, Object> cache = cache(0);
+
+        ArrayList<Integer> keys = new ArrayList<>();
+
+        keys.add(primaryKeys(cache, 1, lastKey).get(0));
+
+        if (gridCount() > 1) {
+            keys.add(backupKeys(cache, 1, lastKey).get(0));
+
+            if (cache.configuration().getCacheMode() != REPLICATED)
+                keys.add(nearKeys(cache, 1, lastKey).get(0));
+        }
+
+        lastKey = Collections.max(keys) + 1;
+
+        return keys;
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f4da39a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java
new file mode 100644
index 0000000..d56854d
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxLocalNoReadThroughTest.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.integration;
+
+import org.gridgain.grid.cache.*;
+
+import static org.gridgain.grid.cache.GridCacheAtomicityMode.*;
+import static org.gridgain.grid.cache.GridCacheDistributionMode.*;
+import static org.gridgain.grid.cache.GridCacheMode.*;
+
+/**
+ *
+ */
+public class IgniteCacheTxLocalNoReadThroughTest extends IgniteCacheNoReadThroughAbstractTest
{
+    /** {@inheritDoc} */
+    @Override protected int gridCount() {
+        return 1;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected GridCacheMode cacheMode() {
+        return LOCAL;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected GridCacheAtomicityMode atomicityMode() {
+        return TRANSACTIONAL;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected GridCacheDistributionMode distributionMode() {
+        return PARTITIONED_ONLY;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f4da39a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoReadThroughTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoReadThroughTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoReadThroughTest.java
new file mode 100644
index 0000000..b4fd3db
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNearEnabledNoReadThroughTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.integration;
+
+import org.gridgain.grid.cache.*;
+
+import static org.gridgain.grid.cache.GridCacheDistributionMode.*;
+
+/**
+ *
+ */
+public class IgniteCacheTxNearEnabledNoReadThroughTest extends IgniteCacheTxNoReadThroughTest
{
+    /** {@inheritDoc} */
+    @Override protected GridCacheDistributionMode distributionMode() {
+        return NEAR_PARTITIONED;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f4da39a5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoReadThroughTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoReadThroughTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoReadThroughTest.java
new file mode 100644
index 0000000..f936449
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxNoReadThroughTest.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.integration;
+
+import org.gridgain.grid.cache.*;
+
+import static org.gridgain.grid.cache.GridCacheAtomicityMode.*;
+import static org.gridgain.grid.cache.GridCacheDistributionMode.*;
+import static org.gridgain.grid.cache.GridCacheMode.*;
+
+/**
+ *
+ */
+public class IgniteCacheTxNoReadThroughTest extends IgniteCacheNoReadThroughAbstractTest
{
+    /** {@inheritDoc} */
+    @Override protected int gridCount() {
+        return 3;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected GridCacheMode cacheMode() {
+        return PARTITIONED;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected GridCacheAtomicityMode atomicityMode() {
+        return TRANSACTIONAL;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected GridCacheDistributionMode distributionMode() {
+        return PARTITIONED_ONLY;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f4da39a5/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 a8f2243..31d7449 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
@@ -346,6 +346,13 @@ public class GridDataGridTestSuite extends TestSuite {
         suite.addTestSuite(IgniteCacheAtomicStoreSessionTest.class);
         suite.addTestSuite(IgniteCacheTxStoreSessionTest.class);
 
+        suite.addTestSuite(IgniteCacheAtomicNoReadThroughTest.class);
+        suite.addTestSuite(IgniteCacheAtomicNearEnabledNoReadThroughTest.class);
+        suite.addTestSuite(IgniteCacheAtomicLocalNoReadThroughTest.class);
+        suite.addTestSuite(IgniteCacheTxNoReadThroughTest.class);
+        suite.addTestSuite(IgniteCacheTxNearEnabledNoReadThroughTest.class);
+        suite.addTestSuite(IgniteCacheTxLocalNoReadThroughTest.class);
+
         return suite;
     }
 }


Mime
View raw message