You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2014/12/09 07:33:06 UTC
[3/5] incubator-ignite git commit: Ignite - Fixing cache tests.
Ignite - Fixing cache tests.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ef04ea46
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ef04ea46
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ef04ea46
Branch: refs/heads/master
Commit: ef04ea463f5af7620cab27ef8c4268105b2f8e2a
Parents: 3ec08ec
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Mon Dec 8 18:56:01 2014 -0800
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Mon Dec 8 18:56:01 2014 -0800
----------------------------------------------------------------------
.../processors/cache/GridCacheTxHandler.java | 2 +-
.../processors/cache/GridCacheTxManager.java | 2 +-
...ansformWriteThroughSingleUpdateSelfTest.java | 98 --------------------
.../bamboo/GridDataGridTestSuite.java | 3 +-
4 files changed, 3 insertions(+), 102 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ef04ea46/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxHandler.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxHandler.java
index e01f5aa..593c424 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxHandler.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxHandler.java
@@ -966,7 +966,7 @@ public class GridCacheTxHandler<K, V> {
res.invalidPartitions(tx.invalidPartitions());
- if (tx.empty()) {
+ if (tx.empty() && req.last()) {
tx.rollback();
return null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ef04ea46/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxManager.java
index 9bd8a7a..52c43f4 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxManager.java
@@ -995,7 +995,7 @@ public class GridCacheTxManager<K, V> extends GridCacheSharedManagerAdapter<K, V
* @return If transaction was not already present in completed set.
*/
public boolean addCommittedTx(GridCacheVersion xidVer, @Nullable GridCacheVersion nearXidVer) {
- assert !rolledbackVers.contains(xidVer);
+ assert !rolledbackVers.contains(xidVer) : "Version was rolled back: " + xidVer;
if (nearXidVer != null)
xidVer = new CommittedVersion(xidVer, nearXidVer);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ef04ea46/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCachePartitionedTransformWriteThroughSingleUpdateSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCachePartitionedTransformWriteThroughSingleUpdateSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCachePartitionedTransformWriteThroughSingleUpdateSelfTest.java
deleted file mode 100644
index 0e431bf..0000000
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCachePartitionedTransformWriteThroughSingleUpdateSelfTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/* @java.file.header */
-
-/* _________ _____ __________________ _____
- * __ ____/___________(_)______ /__ ____/______ ____(_)_______
- * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
- * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
- * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
- */
-
-package org.gridgain.grid.kernal.processors.cache.distributed.dht;
-
-import org.gridgain.grid.*;
-import org.gridgain.testframework.*;
-
-import java.util.concurrent.*;
-
-import static org.gridgain.grid.cache.GridCacheTxConcurrency.OPTIMISTIC;
-
-/**
- * Test for transform put with single update enabled.
- */
-public class GridCachePartitionedTransformWriteThroughSingleUpdateSelfTest
- extends GridCacheAbstractTransformWriteThroughSelfTest {
- /** {@inheritDoc} */
- @Override protected boolean batchUpdate() {
- return false;
- }
-
- /** {@inheritDoc} */
- @Override public void testTransformOptimisticNearUpdate() throws Exception {
- GridTestUtils.assertThrows(log, new Callable<Object>() {
- @Override public Object call() throws Exception {
- checkTransform(OPTIMISTIC, NEAR_NODE, OP_UPDATE);
-
- return null;
- }
- }, GridException.class, null);
-
- }
-
- /** {@inheritDoc} */
- @Override public void testTransformOptimisticPrimaryUpdate() throws Exception {
- GridTestUtils.assertThrows(log, new Callable<Object>() {
- @Override public Object call() throws Exception {
- checkTransform(OPTIMISTIC, PRIMARY_NODE, OP_UPDATE);
-
- return null;
- }
- }, GridException.class, null);
- }
-
- /** {@inheritDoc} */
- @Override public void testTransformOptimisticBackupUpdate() throws Exception {
- GridTestUtils.assertThrows(log, new Callable<Object>() {
- @Override public Object call() throws Exception {
- checkTransform(OPTIMISTIC, BACKUP_NODE, OP_UPDATE);
-
- return null;
- }
- }, GridException.class, null);
-
- }
-
- /** {@inheritDoc} */
- @Override public void testTransformOptimisticNearDelete() throws Exception {
- GridTestUtils.assertThrows(log, new Callable<Object>() {
- @Override public Object call() throws Exception {
- checkTransform(OPTIMISTIC, NEAR_NODE, OP_DELETE);
-
- return null;
- }
- }, GridException.class, null);
-
- }
-
- /** {@inheritDoc} */
- @Override public void testTransformOptimisticPrimaryDelete() throws Exception {
- GridTestUtils.assertThrows(log, new Callable<Object>() {
- @Override public Object call() throws Exception {
- checkTransform(OPTIMISTIC, PRIMARY_NODE, OP_DELETE);
-
- return null;
- }
- },GridException.class, null);
-
- }
-
- /** {@inheritDoc} */
- @Override public void testTransformOptimisticBackupDelete() throws Exception {
- GridTestUtils.assertThrows(log, new Callable<Object>() {
- @Override public Object call() throws Exception {
- checkTransform(OPTIMISTIC, BACKUP_NODE, OP_DELETE);
-
- return null;
- }
- }, GridException.class, null);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ef04ea46/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 7e231d4..90919e2 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
@@ -275,8 +275,7 @@ public class GridDataGridTestSuite extends TestSuite {
suite.addTest(GridCacheWriteBehindTestSuite.suite());
// Transform.
-// suite.addTestSuite(GridCachePartitionedTransformWriteThroughBatchUpdateSelfTest.class);
-// suite.addTestSuite(GridCachePartitionedTransformWriteThroughSingleUpdateSelfTest.class);
+ suite.addTestSuite(GridCachePartitionedTransformWriteThroughBatchUpdateSelfTest.class);
suite.addTestSuite(GridCacheIncrementTransformTest.class);
suite.addTestSuite(GridCacheEntryVersionSelfTest.class);