ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/4] ignite git commit: .NET: Fix DataStreamerTestTopologyChange tests
Date Mon, 21 Nov 2016 15:31:25 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-4154-opt2 ba29a2d4b -> 60ad508c8


.NET: Fix DataStreamerTestTopologyChange tests


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

Branch: refs/heads/ignite-4154-opt2
Commit: c3e8a832098887a0fd09b6e8f63d6a8cbaa20eb9
Parents: 7128a39
Author: Pavel Tupitsyn <ptupitsyn@apache.org>
Authored: Fri Nov 11 18:00:36 2016 +0300
Committer: Pavel Tupitsyn <ptupitsyn@apache.org>
Committed: Fri Nov 11 18:00:36 2016 +0300

----------------------------------------------------------------------
 .../Dataload/DataStreamerTestTopologyChange.cs  | 27 ++++++++++----------
 1 file changed, 13 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c3e8a832/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTestTopologyChange.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTestTopologyChange.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTestTopologyChange.cs
index c1f2c53..9e80c08 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTestTopologyChange.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTestTopologyChange.cs
@@ -19,7 +19,6 @@ namespace Apache.Ignite.Core.Tests.Dataload
 {
     using System;
     using System.Threading;
-    using System.Threading.Tasks;
     using NUnit.Framework;
 
     /// <summary>
@@ -59,7 +58,13 @@ namespace Apache.Ignite.Core.Tests.Dataload
                 var task = streamer.AddData(2, 3);
                 streamer.Flush();
 
-                AssertThrowsCacheStopped(task);
+                var ex = Assert.Throws<AggregateException>(task.Wait).InnerException;
+
+                Assert.IsNotNull(ex);
+
+                Assert.AreEqual("Java exception occurred [class=org.apache.ignite.cache."
+
+                                "CacheServerNotFoundException, message=Failed to find server
node for cache " +
+                                "(all affinity nodes have left the grid or cache was stopped):
cache]", ex.Message);
             }
         }
 
@@ -86,19 +91,13 @@ namespace Apache.Ignite.Core.Tests.Dataload
                 task = streamer.AddData(2, 3);
                 streamer.Flush();
 
-                AssertThrowsCacheStopped(task);
-            }
-        }
+                var ex = Assert.Throws<AggregateException>(task.Wait).InnerException;
 
-        /// <summary>
-        /// Asserts that cache stopped error is thrown.
-        /// </summary>
-        private static void AssertThrowsCacheStopped(Task task)
-        {
-            var ex = Assert.Throws<AggregateException>(task.Wait);
-            Assert.IsTrue(ex.InnerException.Message.Contains(
-                "Failed to find server node for cache " +
-                "(all affinity nodes have left the grid or cache was stopped):"));
+                Assert.IsNotNull(ex);
+
+                Assert.AreEqual("class org.apache.ignite.IgniteCheckedException: DataStreamer
data loading failed.", 
+                    ex.Message);
+            }
         }
     }
 }


Mime
View raw message