ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [6/9] ignite git commit: IGNITE-5050 .NET: IIgnite.GetMemoryMetrics - fix test stability
Date Wed, 17 May 2017 16:03:29 GMT
IGNITE-5050 .NET: IIgnite.GetMemoryMetrics - fix test stability


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

Branch: refs/heads/ignite-5075-cacheStart
Commit: 958b08f502290e9ab59b523535554212a74d1cdc
Parents: 03ed381
Author: Pavel Tupitsyn <ptupitsyn@apache.org>
Authored: Wed May 17 16:11:25 2017 +0300
Committer: Pavel Tupitsyn <ptupitsyn@apache.org>
Committed: Wed May 17 16:11:25 2017 +0300

----------------------------------------------------------------------
 .../Cache/MemoryMetricsTest.cs                        | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/958b08f5/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/MemoryMetricsTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/MemoryMetricsTest.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/MemoryMetricsTest.cs
index 07b596a..0aba377 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/MemoryMetricsTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/MemoryMetricsTest.cs
@@ -42,12 +42,12 @@ namespace Apache.Ignite.Core.Tests.Cache
             var ignite = StartIgniteWithTwoPolicies();
 
             // Verify metrics.
-            var metrics = ignite.GetMemoryMetrics().ToArray();
+            var metrics = ignite.GetMemoryMetrics().OrderBy(x => x.Name).ToArray();
             Assert.AreEqual(3, metrics.Length);  // two defined plus system.
 
-            var sysMetrics = metrics[0];
-            Assert.AreEqual("sysMemPlc", sysMetrics.Name);
-            AssertMetricsAreEmpty(sysMetrics);
+            var emptyMetrics = metrics[0];
+            Assert.AreEqual(MemoryPolicyNoMetrics, emptyMetrics.Name);
+            AssertMetricsAreEmpty(emptyMetrics);
 
             var memMetrics = metrics[1];
             Assert.AreEqual(MemoryPolicyWithMetrics, memMetrics.Name);
@@ -57,9 +57,9 @@ namespace Apache.Ignite.Core.Tests.Cache
             Assert.Greater(memMetrics.PageFillFactor, 0);
             Assert.Greater(memMetrics.TotalAllocatedPages, 1000);
 
-            var emptyMetrics = metrics[2];
-            Assert.AreEqual(MemoryPolicyNoMetrics, emptyMetrics.Name);
-            AssertMetricsAreEmpty(emptyMetrics);
+            var sysMetrics = metrics[2];
+            Assert.AreEqual("sysMemPlc", sysMetrics.Name);
+            AssertMetricsAreEmpty(sysMetrics);
         }
 
         /// <summary>


Mime
View raw message