You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by pt...@apache.org on 2016/11/22 12:58:03 UTC

ignite git commit: IGNITE-4261 .NET: Fix ScanQuery tests: revert some changes from 6578c8b1e2dc57861da7ce448bc9f752ddecdf3a

Repository: ignite
Updated Branches:
  refs/heads/master 5ffb8a74d -> e91c15073


IGNITE-4261 .NET: Fix ScanQuery tests: revert some changes from 6578c8b1e2dc57861da7ce448bc9f752ddecdf3a


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

Branch: refs/heads/master
Commit: e91c15073eb0f9677c8a358a21497e7a6956200f
Parents: 5ffb8a7
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Tue Nov 22 15:57:52 2016 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Tue Nov 22 15:57:52 2016 +0300

----------------------------------------------------------------------
 .../Cache/Query/CacheQueriesTest.cs             | 50 +++++++++++++++++---
 1 file changed, 44 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e91c1507/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
index 9d6f8fb..49f87c6 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
@@ -430,6 +430,42 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
         }
 
         /// <summary>
+        /// Check scan query.
+        /// </summary>
+        [Test]
+        public void TestScanQuery([Values(true, false)]  bool loc)
+        {
+            CheckScanQuery<QueryPerson>(loc, false);
+        }
+
+        /// <summary>
+        /// Check scan query in binary mode.
+        /// </summary>
+        [Test]
+        public void TestScanQueryBinary([Values(true, false)]  bool loc)
+        {
+            CheckScanQuery<BinaryObject>(loc, true);
+        }
+
+        /// <summary>
+        /// Check scan query with partitions.
+        /// </summary>
+        [Test]
+        public void TestScanQueryPartitions([Values(true, false)]  bool loc)
+        {
+            CheckScanQueryPartitions<QueryPerson>(loc, false);
+        }
+
+        /// <summary>
+        /// Check scan query with partitions in binary mode.
+        /// </summary>
+        [Test]
+        public void TestScanQueryPartitionsBinary([Values(true, false)]  bool loc)
+        {
+            CheckScanQueryPartitions<BinaryObject>(loc, true);
+        }
+
+        /// <summary>
         /// Tests that query attempt on non-indexed cache causes an exception.
         /// </summary>
         [Test]
@@ -455,11 +491,12 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
         /// <summary>
         /// Check scan query.
         /// </summary>
-        [Test]
-        public void TestScanQuery<TV>([Values(true, false)] bool loc, [Values(true, false)] bool keepBinary)
+        /// <param name="loc">Local query flag.</param>
+        /// <param name="keepBinary">Keep binary flag.</param>
+        private static void CheckScanQuery<TV>(bool loc, bool keepBinary)
         {
             var cache = Cache();
-            var cnt = MaxItemCnt;
+            int cnt = MaxItemCnt;
 
             // No predicate
             var exp = PopulateCache(cache, loc, cnt, x => true);
@@ -492,14 +529,15 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
         /// <summary>
         /// Checks scan query with partitions.
         /// </summary>
-        [Test]
-        public void TestScanQueryPartitions<TV>([Values(true, false)] bool loc, [Values(true, false)] bool keepBinary)
+        /// <param name="loc">Local query flag.</param>
+        /// <param name="keepBinary">Keep binary flag.</param>
+        private void CheckScanQueryPartitions<TV>(bool loc, bool keepBinary)
         {
             StopGrids();
             StartGrids();
 
             var cache = Cache();
-            var cnt = MaxItemCnt;
+            int cnt = MaxItemCnt;
 
             var aff = cache.Ignite.GetAffinity(CacheName);
             var exp = PopulateCache(cache, loc, cnt, x => true);  // populate outside the loop (slow)