You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/12/17 15:30:33 UTC
ignite git commit: IGNITE-2193: .NET: Fixed SerivceTest.cs.
Repository: ignite
Updated Branches:
refs/heads/ignite-1.5 057ad5bb4 -> 889b26898
IGNITE-2193: .NET: Fixed SerivceTest.cs.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/889b2689
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/889b2689
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/889b2689
Branch: refs/heads/ignite-1.5
Commit: 889b2689816a7185029eb7c992bf73f14600844c
Parents: 057ad5b
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Thu Dec 17 17:31:31 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Dec 17 17:31:31 2015 +0300
----------------------------------------------------------------------
.../Services/ServicesTest.cs | 23 +++++++++++++++-----
1 file changed, 17 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/889b2689/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTest.cs
index 33f255e..ffcdea8 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTest.cs
@@ -218,10 +218,10 @@ namespace Apache.Ignite.Core.Tests.Services
}
Services.Cancel(SvcName + 0);
- Services.Cancel(SvcName + 1);
+ AssertNoService(SvcName + 0);
- Assert.IsNull(Services.GetService<ITestIgniteService>(SvcName + 0));
- Assert.IsNull(Services.GetService<ITestIgniteService>(SvcName + 1));
+ Services.Cancel(SvcName + 1);
+ AssertNoService(SvcName + 1);
for (var i = 2; i < 10; i++)
Assert.IsNotNull(Services.GetService<ITestIgniteService>(SvcName + i));
@@ -229,7 +229,7 @@ namespace Apache.Ignite.Core.Tests.Services
Services.CancelAll();
for (var i = 0; i < 10; i++)
- Assert.IsNull(Services.GetService<ITestIgniteService>(SvcName + i));
+ AssertNoService(SvcName + i);
}
/// <summary>
@@ -477,8 +477,7 @@ namespace Apache.Ignite.Core.Tests.Services
Services.CancelAll();
// Cancellation failed, but service is removed.
- foreach (var grid in Grids)
- Assert.IsNull(grid.GetServices().GetService<ITestIgniteService>(SvcName));
+ AssertNoService();
}
[Test]
@@ -579,6 +578,18 @@ namespace Apache.Ignite.Core.Tests.Services
}
/// <summary>
+ /// Asserts that there is no service on any grid with given name.
+ /// </summary>
+ /// <param name="name">The name.</param>
+ private void AssertNoService(string name = SvcName)
+ {
+ foreach (var grid in Grids)
+ Assert.IsTrue(
+ TestUtils.WaitForCondition(() => grid.GetServices()
+ .GetService<ITestIgniteService>(name) == null, 5000));
+ }
+
+ /// <summary>
/// Gets the services.
/// </summary>
protected virtual IServices Services