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 2016/04/13 16:53:28 UTC
[29/50] ignite git commit: Tests done
Tests done
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6e17c07a
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6e17c07a
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6e17c07a
Branch: refs/heads/ignite-2977
Commit: 6e17c07a30a75a96b6801ff26df9c139534451dc
Parents: ba040da
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Wed Apr 13 13:41:21 2016 +0300
Committer: Pavel Tupitsyn <pt...@gridgain.com>
Committed: Wed Apr 13 13:41:21 2016 +0300
----------------------------------------------------------------------
.../platform/PlatformCacheEntryEventFilter.java | 7 +++++
.../Continuous/ContinuousQueryJavaFilterTest.cs | 29 ++++++++++++++++----
2 files changed, 30 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6e17c07a/modules/core/src/test/java/org/apache/ignite/platform/PlatformCacheEntryEventFilter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/platform/PlatformCacheEntryEventFilter.java b/modules/core/src/test/java/org/apache/ignite/platform/PlatformCacheEntryEventFilter.java
index 22e5691..5dac5fb 100644
--- a/modules/core/src/test/java/org/apache/ignite/platform/PlatformCacheEntryEventFilter.java
+++ b/modules/core/src/test/java/org/apache/ignite/platform/PlatformCacheEntryEventFilter.java
@@ -18,6 +18,7 @@
package org.apache.ignite.platform;
import org.apache.ignite.Ignite;
+import org.apache.ignite.binary.BinaryObject;
import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
import org.apache.ignite.resources.IgniteInstanceResource;
@@ -72,6 +73,9 @@ public class PlatformCacheEntryEventFilter implements CacheEntryEventSerializabl
/** Property to be set from platform. */
private boolean boolField;
+ /** Property to be set from platform. */
+ private BinaryObject objField;
+
/** Injected instance. */
@IgniteInstanceResource
private Ignite ignite;
@@ -96,6 +100,9 @@ public class PlatformCacheEntryEventFilter implements CacheEntryEventSerializabl
assert "11.245".equals(decimalField.toString());
assert boolField;
+ // check binary object
+ assert objField != null && objField.field("Int") == 1 && "2".equals(objField.field("String"));
+
return ((String)event.getValue()).startsWith(startsWith);
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6e17c07a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs
index 51f3cfd..a415380 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs
@@ -20,6 +20,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
{
using System.Collections.Generic;
using System.Linq;
+ using Apache.Ignite.Core.Binary;
using Apache.Ignite.Core.Cache.Event;
using Apache.Ignite.Core.Cache.Query.Continuous;
using Apache.Ignite.Core.Common;
@@ -59,11 +60,11 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
public void FixtureSetUp()
{
// Main .NET nodes
- _ignite =
- Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration())
- {
- SpringConfigUrl = SpringConfig
- });
+ _ignite = Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration())
+ {
+ SpringConfigUrl = SpringConfig,
+ BinaryConfiguration = new BinaryConfiguration(typeof (TestBinary))
+ });
// Second .NET node
Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration())
@@ -111,8 +112,15 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
{"ulongField", (ulong) 8},
{"floatField", (float) 9.99},
{"doubleField", 10.123},
- {"decimalField", (decimal)11.245},
+ {"decimalField", (decimal) 11.245},
{"boolField", true},
+ {
+ "objField", new TestBinary
+ {
+ Int = 1,
+ String = "2"
+ }
+ }
}
};
@@ -211,5 +219,14 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
_lastEvent = evts.FirstOrDefault();
}
}
+
+ /// <summary>
+ /// Test binary object.
+ /// </summary>
+ private class TestBinary
+ {
+ public int Int { get; set; }
+ public string String { get; set; }
+ }
}
}