Adding tests
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a0cbb8db Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a0cbb8db Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a0cbb8db Branch: refs/heads/ignite-2977 Commit: a0cbb8dba1501e7dadbc174d06750df341343b3b Parents: cda0748 Author: Pavel Tupitsyn <[email protected]> Authored: Wed Apr 13 13:09:55 2016 +0300 Committer: Pavel Tupitsyn <[email protected]> Committed: Wed Apr 13 13:09:55 2016 +0300 ---------------------------------------------------------------------- .../apache/ignite/platform/PlatformCacheEntryEventFilter.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/a0cbb8db/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 cc6bd9b..a4fccf1 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 @@ -32,6 +32,10 @@ public class PlatformCacheEntryEventFilter implements CacheEntryEventSerializabl @SuppressWarnings("FieldCanBeLocal") private String startsWith = "-"; + /** Property to be set from platform. */ + @SuppressWarnings("FieldCanBeLocal") + private int maxKey; + /** Injected instance. */ @IgniteInstanceResource private Ignite ignite; @@ -40,6 +44,7 @@ public class PlatformCacheEntryEventFilter implements CacheEntryEventSerializabl @Override public boolean evaluate(CacheEntryEvent event) throws CacheEntryListenerException { assert ignite != null; - return ((String)event.getValue()).startsWith(startsWith); + return ((String)event.getValue()).startsWith(startsWith) && + ((int)event.getKey()) < maxKey; } }
