ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [06/38] ignite git commit: Fixed tests.
Date Wed, 18 May 2016 10:58:12 GMT
Fixed tests.


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

Branch: refs/heads/ignite-3165
Commit: 84b2fdff982ab65fb24f1a9afcb3bb7af3358c21
Parents: 9df46fc
Author: nikolay_tikhonov <ntikhonov@gridgain.com>
Authored: Mon Apr 25 15:37:28 2016 +0300
Committer: nikolay_tikhonov <ntikhonov@gridgain.com>
Committed: Mon Apr 25 15:37:28 2016 +0300

----------------------------------------------------------------------
 .../continuous/CacheContinuousQueryHandler.java | 45 +++++++++++---------
 ...eContinuousQueryAsyncFilterListenerTest.java |  5 ++-
 .../IgniteCacheQuerySelfTestSuite3.java         |  4 ++
 3 files changed, 33 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/84b2fdff/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
index 9ae2972..a46a526 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
@@ -787,26 +787,31 @@ public class CacheContinuousQueryHandler<K, V> implements GridContinuousHandler
             U.error(ctx.log(getClass()), "Failed to send event notification to node: " +
nodeId, ex);
         }
 
-        if (recordIgniteEvt && notify) {
-            ctx.event().record(new CacheQueryReadEvent<>(
-                ctx.discovery().localNode(),
-                "Continuous query executed.",
-                EVT_CACHE_QUERY_OBJECT_READ,
-                CacheQueryType.CONTINUOUS.name(),
-                cacheName,
-                null,
-                null,
-                null,
-                getEventFilter() instanceof CacheEntryEventSerializableFilter ?
-                    (CacheEntryEventSerializableFilter)getEventFilter() : null,
-                null,
-                nodeId,
-                taskName(),
-                evt.getKey(),
-                evt.getValue(),
-                evt.getOldValue(),
-                null
-            ));
+        try {
+            if (recordIgniteEvt && notify) {
+                ctx.event().record(new CacheQueryReadEvent<>(
+                    ctx.discovery().localNode(),
+                    "Continuous query executed.",
+                    EVT_CACHE_QUERY_OBJECT_READ,
+                    CacheQueryType.CONTINUOUS.name(),
+                    cacheName,
+                    null,
+                    null,
+                    null,
+                    getEventFilter() instanceof CacheEntryEventSerializableFilter ?
+                        (CacheEntryEventSerializableFilter)getEventFilter() : null,
+                    null,
+                    nodeId,
+                    taskName(),
+                    evt.getKey(),
+                    evt.getValue(),
+                    evt.getOldValue(),
+                    null
+                ));
+            }
+        }
+        catch (Exception e) {
+            U.error(ctx.log(getClass()), "Failed to fire EVT_CACHE_QUERY_OBJECT_READ event.
", e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/84b2fdff/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java
index 0605bc8..00854f9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java
@@ -56,6 +56,7 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
 
 import static java.util.concurrent.TimeUnit.SECONDS;
+import static org.apache.ignite.IgniteSystemProperties.IGNITE_DISCOVERY_HISTORY_SIZE;
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
@@ -86,6 +87,8 @@ public class CacheContinuousQueryAsyncFilterListenerTest extends GridCommonAbstr
 
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
+        System.setProperty(IGNITE_DISCOVERY_HISTORY_SIZE, "100");
+
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
         ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
@@ -93,7 +96,7 @@ public class CacheContinuousQueryAsyncFilterListenerTest extends GridCommonAbstr
         cfg.setClientMode(client);
 
         MemoryEventStorageSpi storeSpi = new MemoryEventStorageSpi();
-        storeSpi.setExpireCount(1000);
+        storeSpi.setExpireCount(100);
 
         cfg.setEventStorageSpi(storeSpi);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/84b2fdff/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
index e0e81b7..a781fd9 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
@@ -55,6 +55,8 @@ import org.apache.ignite.internal.processors.cache.query.continuous.IgniteCacheC
 import org.apache.ignite.internal.processors.cache.query.continuous.IgniteCacheContinuousQueryClientTest;
 import org.apache.ignite.internal.processors.cache.query.continuous.IgniteCacheContinuousQueryClientTxReconnectTest;
 
+import static org.apache.ignite.IgniteSystemProperties.IGNITE_DISCOVERY_HISTORY_SIZE;
+
 /**
  * Test suite for cache queries.
  */
@@ -66,6 +68,8 @@ public class IgniteCacheQuerySelfTestSuite3 extends TestSuite {
     public static TestSuite suite() throws Exception {
         TestSuite suite = new TestSuite("Ignite Cache Queries Test Suite 3");
 
+        System.setProperty(IGNITE_DISCOVERY_HISTORY_SIZE, "100");
+
         // Continuous queries.
         suite.addTestSuite(GridCacheContinuousQueryLocalSelfTest.class);
         suite.addTestSuite(GridCacheContinuousQueryLocalAtomicSelfTest.class);


Mime
View raw message