ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [23/24] ignite git commit: IGNITE-3430 .NET: Suppress unused class warning for TransactionScope feature
Date Thu, 02 Feb 2017 08:49:21 GMT
IGNITE-3430 .NET: Suppress unused class warning for TransactionScope feature


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

Branch: refs/heads/ignite-2.0
Commit: cfaa5cb2741bec3622d0796695d533a71185e67d
Parents: e92d44f
Author: Pavel Tupitsyn <ptupitsyn@apache.org>
Authored: Wed Feb 1 18:36:00 2017 +0300
Committer: Pavel Tupitsyn <ptupitsyn@apache.org>
Committed: Wed Feb 1 18:36:00 2017 +0300

----------------------------------------------------------------------
 .../Cache/CacheAbstractTransactionalTest.cs     | 87 ++++++++++----------
 .../Transactions/CacheTransactionManager.cs     |  1 +
 2 files changed, 46 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/cfaa5cb2/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 d18cdbe..4bf38b9 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
@@ -776,60 +776,63 @@ namespace Apache.Ignite.Core.Tests.Cache
         [Ignore("IGNITE-3430")]
         public void TestTransactionScopeAllOperations()
         {
-            CheckTxOp((cache, key) => cache.Put(key, -5));
-            CheckTxOp((cache, key) => cache.PutAsync(key, -5).Wait());
+            for (var i = 0; i < 100; i++)
+            {
+                CheckTxOp((cache, key) => cache.Put(key, -5));
+                CheckTxOp((cache, key) => cache.PutAsync(key, -5).Wait());
 
-            CheckTxOp((cache, key) => cache.PutAll(new Dictionary<int, int> {{key,
-7}}));
-            CheckTxOp((cache, key) => cache.PutAllAsync(new Dictionary<int, int>
{{key, -7}}).Wait());
+                CheckTxOp((cache, key) => cache.PutAll(new Dictionary<int, int>
{{key, -7}}));
+                CheckTxOp((cache, key) => cache.PutAllAsync(new Dictionary<int, int>
{{key, -7}}).Wait());
 
-            CheckTxOp((cache, key) =>
-            {
-                cache.Remove(key);
-                cache.PutIfAbsent(key, -10);
-            });
-            CheckTxOp((cache, key) =>
-            {
-                cache.Remove(key);
-                cache.PutIfAbsentAsync(key, -10);
-            });
+                CheckTxOp((cache, key) =>
+                {
+                    cache.Remove(key);
+                    cache.PutIfAbsent(key, -10);
+                });
+                CheckTxOp((cache, key) =>
+                {
+                    cache.Remove(key);
+                    cache.PutIfAbsentAsync(key, -10);
+                });
 
-            CheckTxOp((cache, key) => cache.GetAndPut(key, -9));
-            CheckTxOp((cache, key) => cache.GetAndPutAsync(key, -9).Wait());
+                CheckTxOp((cache, key) => cache.GetAndPut(key, -9));
+                CheckTxOp((cache, key) => cache.GetAndPutAsync(key, -9).Wait());
 
-            CheckTxOp((cache, key) =>
-            {
-                cache.Remove(key);
-                cache.GetAndPutIfAbsent(key, -10);
-            });
-            CheckTxOp((cache, key) =>
-            {
-                cache.Remove(key);
-                cache.GetAndPutIfAbsentAsync(key, -10).Wait();
-            });
+                CheckTxOp((cache, key) =>
+                {
+                    cache.Remove(key);
+                    cache.GetAndPutIfAbsent(key, -10);
+                });
+                CheckTxOp((cache, key) =>
+                {
+                    cache.Remove(key);
+                    cache.GetAndPutIfAbsentAsync(key, -10).Wait();
+                });
 
-            CheckTxOp((cache, key) => cache.GetAndRemove(key));
-            CheckTxOp((cache, key) => cache.GetAndRemoveAsync(key));
+                CheckTxOp((cache, key) => cache.GetAndRemove(key));
+                CheckTxOp((cache, key) => cache.GetAndRemoveAsync(key));
 
-            CheckTxOp((cache, key) => cache.GetAndReplace(key, -11));
-            CheckTxOp((cache, key) => cache.GetAndReplaceAsync(key, -11));
+                CheckTxOp((cache, key) => cache.GetAndReplace(key, -11));
+                CheckTxOp((cache, key) => cache.GetAndReplaceAsync(key, -11));
 
-            CheckTxOp((cache, key) => cache.Invoke(key, new AddProcessor(), 1));
-            CheckTxOp((cache, key) => cache.InvokeAsync(key, new AddProcessor(), 1));
+                CheckTxOp((cache, key) => cache.Invoke(key, new AddProcessor(), 1));
+                CheckTxOp((cache, key) => cache.InvokeAsync(key, new AddProcessor(), 1));
 
-            CheckTxOp((cache, key) => cache.InvokeAll(new[] {key}, new AddProcessor(),
1));
-            CheckTxOp((cache, key) => cache.InvokeAllAsync(new[] {key}, new AddProcessor(),
1));
+                CheckTxOp((cache, key) => cache.InvokeAll(new[] {key}, new AddProcessor(),
1));
+                CheckTxOp((cache, key) => cache.InvokeAllAsync(new[] {key}, new AddProcessor(),
1));
 
-            CheckTxOp((cache, key) => cache.Remove(key));
-            CheckTxOp((cache, key) => cache.RemoveAsync(key));
+                CheckTxOp((cache, key) => cache.Remove(key));
+                CheckTxOp((cache, key) => cache.RemoveAsync(key));
 
-            CheckTxOp((cache, key) => cache.RemoveAll(new[] { key }));
-            CheckTxOp((cache, key) => cache.RemoveAllAsync(new[] { key }).Wait());
+                CheckTxOp((cache, key) => cache.RemoveAll(new[] {key}));
+                CheckTxOp((cache, key) => cache.RemoveAllAsync(new[] {key}).Wait());
 
-            CheckTxOp((cache, key) => cache.Replace(key, 100));
-            CheckTxOp((cache, key) => cache.ReplaceAsync(key, 100));
+                CheckTxOp((cache, key) => cache.Replace(key, 100));
+                CheckTxOp((cache, key) => cache.ReplaceAsync(key, 100));
 
-            CheckTxOp((cache, key) => cache.Replace(key, cache[key], 100));
-            CheckTxOp((cache, key) => cache.ReplaceAsync(key, cache[key], 100));
+                CheckTxOp((cache, key) => cache.Replace(key, cache[key], 100));
+                CheckTxOp((cache, key) => cache.ReplaceAsync(key, cache[key], 100));
+            }
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/cfaa5cb2/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/CacheTransactionManager.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/CacheTransactionManager.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/CacheTransactionManager.cs
index f5a1617..bc76ca1 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/CacheTransactionManager.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/CacheTransactionManager.cs
@@ -27,6 +27,7 @@ namespace Apache.Ignite.Core.Impl.Transactions
     /// Cache transaction enlistment manager, 
     /// allows using Ignite transactions via standard <see cref="TransactionScope"/>.
     /// </summary>
+    // ReSharper disable once ClassNeverInstantiated.Global
     internal class CacheTransactionManager : IEnlistmentNotification
     {
         /** */


Mime
View raw message