ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # ignite-sprint-4 added GridCachePutAllFailoverSelfTest for atomic cache
Date Mon, 13 Apr 2015 09:23:19 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-sprint-4 70b0c296a -> 92e9cd44f


# ignite-sprint-4 added GridCachePutAllFailoverSelfTest for atomic cache


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

Branch: refs/heads/ignite-sprint-4
Commit: 92e9cd44f05f0296623782d618d6a97a39e129ea
Parents: 70b0c29
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Apr 13 12:23:04 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Apr 13 12:23:04 2015 +0300

----------------------------------------------------------------------
 .../GridCacheAtomicPutAllFailoverSelfTest.java  | 32 ++++++++++++++++++++
 .../cache/GridCachePutAllFailoverSelfTest.java  | 12 +++++++-
 .../GridCachePartitionedTxSalvageSelfTest.java  |  4 +++
 .../testsuites/IgniteCacheRestartTestSuite.java |  3 +-
 4 files changed, 49 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/92e9cd44/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicPutAllFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicPutAllFailoverSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicPutAllFailoverSelfTest.java
new file mode 100644
index 0000000..39277c5
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicPutAllFailoverSelfTest.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;
+
+import org.apache.ignite.cache.*;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+
+/**
+ *
+ */
+public class GridCacheAtomicPutAllFailoverSelfTest extends GridCachePutAllFailoverSelfTest
{
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicityMode atomicityMode() {
+        return ATOMIC;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/92e9cd44/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
index 4b5c250..de6cce9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
@@ -40,6 +40,8 @@ import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
 
+import static org.apache.ignite.cache.CacheAtomicityMode.*;
+import static org.apache.ignite.cache.CacheMode.*;
 import static org.apache.ignite.cache.CachePeekMode.*;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
 
@@ -595,6 +597,13 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest
{
         return ret;
     }
 
+    /**
+     * @return Cache atomicity mode.
+     */
+    protected CacheAtomicityMode atomicityMode() {
+        return TRANSACTIONAL;
+    }
+
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
@@ -626,7 +635,8 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest
{
 
             CacheConfiguration cacheCfg = defaultCacheConfiguration();
             cacheCfg.setName("partitioned");
-            cacheCfg.setCacheMode(CacheMode.PARTITIONED);
+            cacheCfg.setAtomicityMode(atomicityMode());
+            cacheCfg.setCacheMode(PARTITIONED);
             cacheCfg.setStartSize(4500000);
 
             cacheCfg.setBackups(backups);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/92e9cd44/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
index 45eefa4..5072642 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
@@ -86,11 +86,13 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes
         return c;
     }
 
+    /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
         // Set salvage timeout system property.
         salvageTimeoutOld = System.setProperty(IGNITE_TX_SALVAGE_TIMEOUT, SALVAGE_TIMEOUT.toString());
     }
 
+    /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         // Restore salvage timeout system property to its initial state.
         if (salvageTimeoutOld != null)
@@ -99,11 +101,13 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes
             System.clearProperty(IGNITE_TX_SALVAGE_TIMEOUT);
     }
 
+    /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
         // Start the grid.
         startGridsMultiThreaded(GRID_CNT);
     }
 
+    /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
         // Shutwodn the gird.
         stopAllGrids();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/92e9cd44/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java
index 5c7581a..c5716e4 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java
@@ -40,8 +40,9 @@ public class IgniteCacheRestartTestSuite extends TestSuite {
         // TODO: uncomment when fix GG-1969
 //        suite.addTestSuite(GridCacheReplicatedNodeRestartSelfTest.class);
 
-        // The rest.
         suite.addTestSuite(GridCachePartitionedTxSalvageSelfTest.class);
+
+        suite.addTestSuite(GridCacheAtomicPutAllFailoverSelfTest.class);
 //        suite.addTestSuite(GridCachePutAllFailoverSelfTest.class); TODO IGNITE-157
 
         return suite;


Mime
View raw message