[1/8] ignite git commit: IGNITE-3430 .NET: Enable TransactionScope API again, fix and improve tests

2017-02-06 Thread vozerov
Repository: ignite
Updated Branches:
  refs/heads/ignite-2.0 aa46bc7c8 -> af98efd54


IGNITE-3430 .NET: Enable TransactionScope API again, fix and improve tests

This closes #1487


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

Branch: refs/heads/ignite-2.0
Commit: b0e104e87e40e6cd4164d96d17d757b822a50e9b
Parents: cfaa5cb
Author: Pavel Tupitsyn 
Authored: Thu Feb 2 18:34:54 2017 +0300
Committer: Pavel Tupitsyn 
Committed: Thu Feb 2 18:34:54 2017 +0300

--
 .../Cache/CacheAbstractTransactionalTest.cs | 105 ++-
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  |   9 +-
 2 files changed, 58 insertions(+), 56 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/b0e104e8/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
--
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
index 4bf38b9..2107399 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
@@ -569,7 +569,6 @@ namespace Apache.Ignite.Core.Tests.Cache
 /// Test Ignite transaction enlistment in ambient .
 /// 
 [Test]
-[Ignore("IGNITE-3430")]
 public void TestTransactionScopeSingleCache()
 {
 var cache = Cache();
@@ -607,7 +606,6 @@ namespace Apache.Ignite.Core.Tests.Cache
 /// with multiple participating caches.
 /// 
 [Test]
-[Ignore("IGNITE-3430")]
 public void TestTransactionScopeMultiCache()
 {
 var cache1 = Cache();
@@ -648,7 +646,6 @@ namespace Apache.Ignite.Core.Tests.Cache
 /// when Ignite tx is started manually.
 /// 
 [Test]
-[Ignore("IGNITE-3430")]
 public void TestTransactionScopeWithManualIgniteTx()
 {
 var cache = Cache();
@@ -674,7 +671,6 @@ namespace Apache.Ignite.Core.Tests.Cache
 /// Test Ignite transaction with  option.
 /// 
 [Test]
-[Ignore("IGNITE-3430")]
 public void TestSuppressedTransactionScope()
 {
 var cache = Cache();
@@ -694,7 +690,6 @@ namespace Apache.Ignite.Core.Tests.Cache
 /// Test Ignite transaction enlistment in ambient  with nested scopes.
 /// 
 [Test]
-[Ignore("IGNITE-3430")]
 public void TestNestedTransactionScope()
 {
 var cache = Cache();
@@ -737,7 +732,6 @@ namespace Apache.Ignite.Core.Tests.Cache
 /// Test that ambient  options propagate 
to Ignite transaction.
 /// 
 [Test]
-[Ignore("IGNITE-3430")]
 public void TestTransactionScopeOptions()
 {
 var cache = Cache();
@@ -773,10 +767,9 @@ namespace Apache.Ignite.Core.Tests.Cache
 /// Tests all transactional operations with .
 /// 
 [Test]
-[Ignore("IGNITE-3430")]
 public void TestTransactionScopeAllOperations()
 {
-for (var i = 0; i < 100; i++)
+for (var i = 0; i < 10; i++)
 {
 CheckTxOp((cache, key) => cache.Put(key, -5));
 CheckTxOp((cache, key) => cache.PutAsync(key, -5).Wait());
@@ -792,7 +785,7 @@ namespace Apache.Ignite.Core.Tests.Cache
 CheckTxOp((cache, key) =>
 {
 cache.Remove(key);
-cache.PutIfAbsentAsync(key, -10);
+cache.PutIfAbsentAsync(key, -10).Wait();
 });
 
 CheckTxOp((cache, key) => cache.GetAndPut(key, -9));
@@ -810,28 +803,28 @@ namespace Apache.Ignite.Core.Tests.Cache
 });
 
 CheckTxOp((cache, key) => cache.GetAndRemove(key));
-CheckTxOp((cache, key) => cache.GetAndRemoveAsync(key));
+CheckTxOp((cache, key) => cache.GetAndRemoveAsync(key).Wait());
 
 CheckTxOp((cache, key) => cache.GetAndReplace(key, -11));
-CheckTxOp((cache, key) => cache.GetAndReplaceAsync(key, -11));
+CheckTxOp((cache, key) => cache.GetAndReplaceAsync(key, 
-11).Wait());
 
 CheckTxOp((cache, key) => cache.Invoke(key, new 
AddProcessor(), 1));
-CheckTxOp((cache, key) => cache.InvokeAsync(key, new 
AddProcessor(), 1));
+  

[1/8] ignite git commit: IGNITE-3430 .NET: Enable TransactionScope API again, fix and improve tests

2017-02-06 Thread vozerov
Repository: ignite
Updated Branches:
  refs/heads/ignite-4475-async 5cf6dc4d9 -> 055295edd


IGNITE-3430 .NET: Enable TransactionScope API again, fix and improve tests

This closes #1487


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

Branch: refs/heads/ignite-4475-async
Commit: b0e104e87e40e6cd4164d96d17d757b822a50e9b
Parents: cfaa5cb
Author: Pavel Tupitsyn 
Authored: Thu Feb 2 18:34:54 2017 +0300
Committer: Pavel Tupitsyn 
Committed: Thu Feb 2 18:34:54 2017 +0300

--
 .../Cache/CacheAbstractTransactionalTest.cs | 105 ++-
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  |   9 +-
 2 files changed, 58 insertions(+), 56 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/b0e104e8/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
--
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
index 4bf38b9..2107399 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
@@ -569,7 +569,6 @@ namespace Apache.Ignite.Core.Tests.Cache
 /// Test Ignite transaction enlistment in ambient .
 /// 
 [Test]
-[Ignore("IGNITE-3430")]
 public void TestTransactionScopeSingleCache()
 {
 var cache = Cache();
@@ -607,7 +606,6 @@ namespace Apache.Ignite.Core.Tests.Cache
 /// with multiple participating caches.
 /// 
 [Test]
-[Ignore("IGNITE-3430")]
 public void TestTransactionScopeMultiCache()
 {
 var cache1 = Cache();
@@ -648,7 +646,6 @@ namespace Apache.Ignite.Core.Tests.Cache
 /// when Ignite tx is started manually.
 /// 
 [Test]
-[Ignore("IGNITE-3430")]
 public void TestTransactionScopeWithManualIgniteTx()
 {
 var cache = Cache();
@@ -674,7 +671,6 @@ namespace Apache.Ignite.Core.Tests.Cache
 /// Test Ignite transaction with  option.
 /// 
 [Test]
-[Ignore("IGNITE-3430")]
 public void TestSuppressedTransactionScope()
 {
 var cache = Cache();
@@ -694,7 +690,6 @@ namespace Apache.Ignite.Core.Tests.Cache
 /// Test Ignite transaction enlistment in ambient  with nested scopes.
 /// 
 [Test]
-[Ignore("IGNITE-3430")]
 public void TestNestedTransactionScope()
 {
 var cache = Cache();
@@ -737,7 +732,6 @@ namespace Apache.Ignite.Core.Tests.Cache
 /// Test that ambient  options propagate 
to Ignite transaction.
 /// 
 [Test]
-[Ignore("IGNITE-3430")]
 public void TestTransactionScopeOptions()
 {
 var cache = Cache();
@@ -773,10 +767,9 @@ namespace Apache.Ignite.Core.Tests.Cache
 /// Tests all transactional operations with .
 /// 
 [Test]
-[Ignore("IGNITE-3430")]
 public void TestTransactionScopeAllOperations()
 {
-for (var i = 0; i < 100; i++)
+for (var i = 0; i < 10; i++)
 {
 CheckTxOp((cache, key) => cache.Put(key, -5));
 CheckTxOp((cache, key) => cache.PutAsync(key, -5).Wait());
@@ -792,7 +785,7 @@ namespace Apache.Ignite.Core.Tests.Cache
 CheckTxOp((cache, key) =>
 {
 cache.Remove(key);
-cache.PutIfAbsentAsync(key, -10);
+cache.PutIfAbsentAsync(key, -10).Wait();
 });
 
 CheckTxOp((cache, key) => cache.GetAndPut(key, -9));
@@ -810,28 +803,28 @@ namespace Apache.Ignite.Core.Tests.Cache
 });
 
 CheckTxOp((cache, key) => cache.GetAndRemove(key));
-CheckTxOp((cache, key) => cache.GetAndRemoveAsync(key));
+CheckTxOp((cache, key) => cache.GetAndRemoveAsync(key).Wait());
 
 CheckTxOp((cache, key) => cache.GetAndReplace(key, -11));
-CheckTxOp((cache, key) => cache.GetAndReplaceAsync(key, -11));
+CheckTxOp((cache, key) => cache.GetAndReplaceAsync(key, 
-11).Wait());
 
 CheckTxOp((cache, key) => cache.Invoke(key, new 
AddProcessor(), 1));
-CheckTxOp((cache, key) => cache.InvokeAsync(key, new