.NET: Fix resource cleanup in AffinityFunctionTest
@@ -90,6 +90,8 @@ namespace Apache.Ignite.Core.Tests.Cache.Affinity
/// </summary>
[TestFixtureTearDown]
public void FixtureTearDown()
+ {
+ try
{
// Check that affinity handles are present
TestUtils.AssertHandleRegistryHasItems(_ignite, _ignite.GetCacheNames().Count - 3, 0);
@@ -101,9 +103,12 @@ namespace Apache.Ignite.Core.Tests.Cache.Affinity
// Check that all affinity functions got released
TestUtils.AssertHandleRegistryIsEmpty(1000, _ignite, _ignite2);
-
+ }
+ finally
+ {
Ignition.StopAll(true);
}
+ }
/// <summary>
/// Tests the static cache.
