Fix init test

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

Branch: refs/heads/ignite-3199-1
Commit: 469be48f2933480c23cba3332db1f8255ce9d958
Parents: b3dcf7f
Author: Pavel Tupitsyn <ptupit...@apache.org>
Authored: Fri Sep 16 12:36:31 2016 +0300
Committer: Pavel Tupitsyn <ptupit...@apache.org>
Committed: Fri Sep 16 12:36:31 2016 +0300

----------------------------------------------------------------------
 .../IgniteSessionStateStoreProviderTest.cs                  | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/469be48f/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/IgniteSessionStateStoreProviderTest.cs
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/IgniteSessionStateStoreProviderTest.cs
 
b/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/IgniteSessionStateStoreProviderTest.cs
index b47799b..1ede425 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/IgniteSessionStateStoreProviderTest.cs
+++ 
b/modules/platforms/dotnet/Apache.Ignite.AspNet.Tests/IgniteSessionStateStoreProviderTest.cs
@@ -119,14 +119,19 @@ namespace Apache.Ignite.AspNet.Tests
             Assert.Throws<InvalidOperationException>(() =>
                     stateProvider.GetItem(HttpContext, Id, out locked, out 
lockAge, out lockId, out actions));
 
-            // Grid not started.
-            Assert.Throws<IgniteException>(() =>
+            // Grid not started - should be started automatically with default 
configuration.
+            // However, default config does not work in test environment, so 
this fails with a specific error.
+            var ex = Assert.Throws<IgniteException>(() =>
                 stateProvider.Initialize("testName", new NameValueCollection
                 {
                     {GridNameAttr, "invalidGridName"},
                     {CacheNameAttr, CacheName}
                 }));
 
+            Assert.IsNotNull(ex.InnerException);
+            Assert.AreEqual("Failed to start manager: GridManagerAdapter 
[enabled=true, name=org.apache.ignite." +
+                            
"internal.managers.discovery.GridDiscoveryManager]", ex.InnerException.Message);
+
             // Valid grid.
             stateProvider = GetProvider();
 

Reply via email to