.NET: Add timeout to TestTxDeadlockDetection

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

Branch: refs/heads/ignite-zk
Commit: 79c9c7552311e4fd780837a0cd8163ae554b368d
Parents: a7f0422
Author: Pavel Tupitsyn <[email protected]>
Authored: Thu Jan 11 17:16:57 2018 +0300
Committer: Pavel Tupitsyn <[email protected]>
Committed: Thu Jan 11 17:16:57 2018 +0300

----------------------------------------------------------------------
 .../Cache/CacheAbstractTransactionalTest.cs               | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/79c9c755/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 fac5614..7a60e9a 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
@@ -529,7 +529,7 @@ namespace Apache.Ignite.Core.Tests.Cache
         /// <summary>
         /// Tests the transaction deadlock detection.
         /// </summary>
-        [Test, Timeout(50000)]
+        [Test]
         public void TestTxDeadlockDetection()
         {
             var cache = Cache();
@@ -556,8 +556,12 @@ namespace Apache.Ignite.Core.Tests.Cache
 
             // Increment keys within tx in different order to cause a deadlock.
             var aex = Assert.Throws<AggregateException>(() =>
-                Task.WaitAll(Task.Factory.StartNew(() => increment(keys0)),
-                             Task.Factory.StartNew(() => 
increment(keys0.Reverse().ToArray()))));
+                Task.WaitAll(new[]
+                    {
+                        Task.Factory.StartNew(() => increment(keys0)),
+                        Task.Factory.StartNew(() => 
increment(keys0.Reverse().ToArray()))
+                    },
+                    TimeSpan.FromSeconds(40)));
 
             Assert.AreEqual(2, aex.InnerExceptions.Count);
 

Reply via email to