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/06/16 11:54:11 UTC

ignite git commit: IGNITE-3105 .NET: Fix ContinuousQueryAbstractTest.TestCallback sporadic failures

Repository: ignite
Updated Branches:
  refs/heads/master ca546b3d4 -> 2d69ed630


IGNITE-3105 .NET: Fix ContinuousQueryAbstractTest.TestCallback sporadic failures

This closes #782


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

Branch: refs/heads/master
Commit: 2d69ed63001b2f99027374aed04a49400503182e
Parents: ca546b3
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Thu Jun 16 14:54:01 2016 +0300
Committer: Pavel Tupitsyn <pt...@gridgain.com>
Committed: Thu Jun 16 14:54:01 2016 +0300

----------------------------------------------------------------------
 .../Continuous/ContinuousQueryAbstractTest.cs     | 18 +++++++++++++-----
 .../Config/cache-query-continuous.xml             |  1 +
 2 files changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/2d69ed63/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
index 296b348..4b285f9 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
@@ -31,7 +31,6 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
     using Apache.Ignite.Core.Cache.Query.Continuous;
     using Apache.Ignite.Core.Cluster;
     using Apache.Ignite.Core.Common;
-    using Apache.Ignite.Core.Impl;
     using Apache.Ignite.Core.Impl.Cache.Event;
     using Apache.Ignite.Core.Resource;
     using NUnit.Framework;
@@ -171,6 +170,8 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
             int key1 = PrimaryKey(cache1);
             int key2 = PrimaryKey(cache2);
 
+            Assert.AreNotEqual(key1, key2);
+
             ContinuousQuery<int, BinarizableEntry> qry =
                 new ContinuousQuery<int, BinarizableEntry>(new Listener<BinarizableEntry>());
 
@@ -938,12 +939,13 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
             CallbackEvent evt;
 
             Assert.IsTrue(CB_EVTS.TryTake(out evt, timeout));
+            Assert.AreEqual(0, CB_EVTS.Count);
 
-            Assert.AreEqual(1, evt.entries.Count);
+            var e = evt.entries.Single();
 
-            Assert.AreEqual(expKey, evt.entries.First().Key);
-            Assert.AreEqual(expOldVal, evt.entries.First().OldValue);
-            Assert.AreEqual(expVal, evt.entries.First().Value);
+            Assert.AreEqual(expKey, e.Key);
+            Assert.AreEqual(expOldVal, e.OldValue);
+            Assert.AreEqual(expVal, e.Value);
         }
 
         /// <summary>
@@ -1055,6 +1057,12 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
             {
                 return obj != null && obj is BinarizableEntry && ((BinarizableEntry)obj).val == val;
             }
+
+            /** <inheritDoc /> */
+            public override string ToString()
+            {
+                return string.Format("BinarizableEntry [Val: {0}]", val);
+            }
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/2d69ed63/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/cache-query-continuous.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/cache-query-continuous.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/cache-query-continuous.xml
index 2a79994..72d9d46 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/cache-query-continuous.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/cache-query-continuous.xml
@@ -27,6 +27,7 @@
     <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
         <property name="localHost" value="127.0.0.1"/>
         <property name="connectorConfiguration"><null/></property>
+        <property name="lateAffinityAssignment" value="false"/>
 
         <property name="cacheConfiguration">
             <list>