ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [37/50] ignite git commit: Fixed NPE when test kernal context is used
Date Tue, 11 Jul 2017 09:27:36 GMT
Fixed NPE when test kernal context is used


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

Branch: refs/heads/master
Commit: 56868102ef46e37a914593fa0f81317ccb8e4cc4
Parents: 17d881b
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Mon Jul 10 14:02:30 2017 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Mon Jul 10 14:02:30 2017 +0300

----------------------------------------------------------------------
 .../testframework/junits/GridTestKernalContext.java       | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/56868102/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridTestKernalContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridTestKernalContext.java
b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridTestKernalContext.java
index 3d3de22..6b39faa 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridTestKernalContext.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridTestKernalContext.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.testframework.junits;
 
+import java.util.Collections;
 import java.util.List;
 import java.util.ListIterator;
 import java.util.concurrent.ExecutorService;
@@ -28,8 +29,10 @@ import org.apache.ignite.internal.GridKernalContextImpl;
 import org.apache.ignite.internal.GridKernalGatewayImpl;
 import org.apache.ignite.internal.GridLoggerProxy;
 import org.apache.ignite.internal.IgniteKernal;
+import org.apache.ignite.internal.processors.plugin.IgnitePluginProcessor;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.plugin.PluginProvider;
 import org.apache.ignite.testframework.GridTestUtils;
 
 /**
@@ -41,6 +44,13 @@ public class GridTestKernalContext extends GridKernalContextImpl {
      */
     public GridTestKernalContext(IgniteLogger log) {
         this(log, new IgniteConfiguration());
+
+        try {
+            add(new IgnitePluginProcessor(this, config(), Collections.<PluginProvider>emptyList()));
+        }
+        catch (IgniteCheckedException e) {
+            throw new IllegalStateException("Must not fail for empty plugins list.", e);
+        }
     }
 
     /**


Mime
View raw message