ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [14/15] incubator-ignite git commit: IGNITE-306 Fixed review notes.
Date Wed, 25 Feb 2015 07:14:43 GMT
IGNITE-306 Fixed review notes.


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

Branch: refs/heads/ignite-306
Commit: 8070f575024e1b15e090a85817279a016add53a1
Parents: 1a3a49b
Author: nikolay_tikhonov <ntikhonov@gridgain.com>
Authored: Wed Feb 25 10:12:40 2015 +0300
Committer: nikolay_tikhonov <ntikhonov@gridgain.com>
Committed: Wed Feb 25 10:12:40 2015 +0300

----------------------------------------------------------------------
 .../internal/util/IgniteExceptionRegistry.java  | 79 ++++++++++++++++----
 .../org/apache/ignite/spi/IgniteSpiAdapter.java | 11 ++-
 .../communication/tcp/TcpCommunicationSpi.java  |  5 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      | 61 ++++++++-------
 .../util/IgniteExceptionRegistrySelfTest.java   |  4 +-
 .../testframework/GridSpiTestContext.java       |  2 +-
 .../junits/GridTestKernalContext.java           |  3 +-
 .../testsuites/IgniteUtilSelfTestSuite.java     |  1 +
 8 files changed, 118 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8070f575/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
index fd69d50..ab1d9bf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteExceptionRegistry.java
@@ -32,6 +32,9 @@ import static org.apache.ignite.IgniteSystemProperties.*;
  */
 public class IgniteExceptionRegistry {
     /** */
+    public static final IgniteExceptionRegistry DUMMY_REGISTRY = new DummyRegistry();
+    
+    /** */
     public static final int DEFAULT_QUEUE_SIZE = 1000;
 
     /** */
@@ -41,7 +44,7 @@ public class IgniteExceptionRegistry {
     private AtomicLong errorCnt = new AtomicLong();
 
     /** */
-    private final ConcurrentLinkedDeque<IgniteExceptionInfo> queue = new ConcurrentLinkedDeque<>();
+    private final ConcurrentLinkedDeque<ExceptionInfo> queue;
 
     /** */
     private final IgniteLogger log;
@@ -53,6 +56,15 @@ public class IgniteExceptionRegistry {
      */
     public IgniteExceptionRegistry(IgniteLogger log) {
         this.log = log;
+        this.queue = new ConcurrentLinkedDeque<>();
+    }
+
+    /**
+     * Default constructor.
+     */
+    protected IgniteExceptionRegistry() {
+        this.log = null;
+        this.queue = null;
     }
 
     /**
@@ -68,7 +80,7 @@ public class IgniteExceptionRegistry {
         while (queue.size() >= maxSize)
             queue.pollLast();
 
-        queue.offerFirst(new IgniteExceptionInfo(e, msg, Thread.currentThread().getId(),
+        queue.offerFirst(new ExceptionInfo(e, msg, Thread.currentThread().getId(),
             Thread.currentThread().getName(), U.currentTimeMillis()));
     }
 
@@ -77,10 +89,10 @@ public class IgniteExceptionRegistry {
      *
      * @return Exceptions.
      */
-    Collection<IgniteExceptionInfo> getErrors() {
-        List<IgniteExceptionInfo> errors = new ArrayList<>();
+    Collection<ExceptionInfo> getErrors() {
+        List<ExceptionInfo> errors = new ArrayList<>();
 
-        for (IgniteExceptionInfo entry : queue)
+        for (ExceptionInfo entry : queue)
             errors.add(entry);
 
         return errors;
@@ -105,17 +117,17 @@ public class IgniteExceptionRegistry {
 
         int cnt = 0;
 
-        Iterator<IgniteExceptionInfo> descIter = queue.descendingIterator();
+        Iterator<ExceptionInfo> descIter = queue.descendingIterator();
 
         while (descIter.hasNext() && cnt < size){
-            IgniteExceptionInfo error = descIter.next();
+            ExceptionInfo error = descIter.next();
 
             log.error(
                 "Time of occurrence: " + new Date(error.time()) + "\n" +
                 "Error message: " + error.message() + "\n" +
                 "Thread id: " + error.threadId() + "\n" +
                 "Thread name: " + error.threadName(),
-                error.exception()
+                error.error()
             );
 
             ++cnt;
@@ -134,10 +146,10 @@ public class IgniteExceptionRegistry {
     /**
      *
      */
-    static class IgniteExceptionInfo {
+    static class ExceptionInfo {
         /** */
         @GridToStringExclude
-        private final Throwable exception;
+        private final Throwable error;
 
         /** */
         private final long threadId;
@@ -159,8 +171,8 @@ public class IgniteExceptionRegistry {
          * @param threadName Thread name.
          * @param time Occurrence time.
          */
-        public IgniteExceptionInfo(Throwable exception, String msg, long threadId, String
threadName, long time) {
-            this.exception = exception;
+        public ExceptionInfo(Throwable exception, String msg, long threadId, String threadName,
long time) {
+            this.error = exception;
             this.threadId = threadId;
             this.threadName = threadName;
             this.time = time;
@@ -177,8 +189,8 @@ public class IgniteExceptionRegistry {
         /**
          * @return Exception.
          */
-        public Throwable exception() {
-            return exception;
+        public Throwable error() {
+            return error;
         }
 
         /**
@@ -204,7 +216,44 @@ public class IgniteExceptionRegistry {
 
         /** {@inheritDoc} */
         public String toString() {
-            return S.toString(IgniteExceptionInfo.class, this);
+            return S.toString(ExceptionInfo.class, this);
+        }
+    }
+
+    /**
+     * Dummy registry.
+     */
+    private static final class DummyRegistry extends IgniteExceptionRegistry {
+        /**
+         * Constructor.
+         */
+        private DummyRegistry() {
+            super(null);
+        }
+
+        /** {@inheritDoc} */
+        @Override public void onException(String msg, Throwable e) {
+            // No-op.
+        }
+
+        /** {@inheritDoc} */
+        @Override Collection<ExceptionInfo> getErrors() {
+            return Collections.emptyList();
+        }
+
+        /** {@inheritDoc} */
+        @Override public void setMaxSize(int maxSize) {
+            // No-op.
+        }
+
+        /** {@inheritDoc} */
+        @Override public void printErrors() {
+            // No-op.
+        }
+
+        /** {@inheritDoc} */
+        @Override public long errorCount() {
+            return -1L;
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8070f575/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
index 7e2fb9c..f8ffb29 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java
@@ -215,6 +215,15 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement
         return spiCtx;
     }
 
+    /**
+     * Gets Exception registry.
+     *
+     * @return Exception registry.
+     */
+    public IgniteExceptionRegistry getExceptionRegistry() {
+        return spiCtx.exceptionRegistry();
+    }
+
     /** {@inheritDoc} */
     @Override public Map<String, Object> getNodeAttributes() throws IgniteSpiException
{
         return Collections.emptyMap();
@@ -716,7 +725,7 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement
 
         /** {@inheritDoc} */
         @Override public IgniteExceptionRegistry exceptionRegistry() {
-            return null;
+            return IgniteExceptionRegistry.DUMMY_REGISTRY;
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8070f575/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index af1563e..903729d 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -2352,9 +2352,8 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
      * @param msg Error message.
      * @param e Exception.
      */
-    private void onException(String msg, Exception e){
-        if (super.getSpiContext().exceptionRegistry() != null)
-            super.getSpiContext().exceptionRegistry().onException(msg, e);
+    private void onException(String msg, Exception e) {
+        getExceptionRegistry().onException(msg, e);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8070f575/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index 11167e4..59336ad 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -1144,7 +1144,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                 if (log.isDebugEnabled())
                     log.debug("Failed to ping node [node=" + node + ", err=" + e.getMessage()
+ ']');
 
-                onException("Failed to ping node=" + node, e);
+                onException("Failed to ping node [node=" + node + ", err=" + e.getMessage()
+ ']', e);
                 // continue;
             }
         }
@@ -1453,7 +1453,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                         log.debug("Failed to send join request message [addr=" + addr +
                             ", msg=" + ioe != null ? ioe.getMessage() : e.getMessage() +
']');
 
-                        onException("Failed to send join request message addr=" + addr, ioe);
+                        onException("Failed to send join request message [addr=" + addr +
+                            ", msg=" + ioe != null ? ioe.getMessage() : e.getMessage() +
']', ioe);
                     }
 
                     noResAddrs.add(addr);
@@ -1583,7 +1584,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                 if (log.isDebugEnabled())
                     U.error(log, "Class cast exception on direct send: " + addr, e);
 
-                onException("Class cast exception on direct send.", e);
+                onException("Class cast exception on direct send: " + addr, e);
 
                 if (errs == null)
                     errs = new ArrayList<>();
@@ -1594,7 +1595,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                 if (log.isDebugEnabled())
                     log.error("Exception on direct send: " + e.getMessage(), e);
 
-                onException("Exception on direct send.", e);
+                onException("Exception on direct send: " + e.getMessage(), e);
 
                 if (errs == null)
                     errs = new ArrayList<>();
@@ -1758,8 +1759,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
      * @param e Exception.
      */
     private void onException(String msg, Exception e){
-        if (super.getSpiContext().exceptionRegistry() != null)
-            super.getSpiContext().exceptionRegistry().onException(msg, e);
+        getExceptionRegistry().onException(msg, e);
     }
 
     /**
@@ -2750,7 +2750,7 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                                 if (log.isDebugEnabled())
                                     log.debug("Failed to connect to next node [msg=" + msg
+ ", err=" + e + ']');
 
-                                onException("Failed to connect to next node msg=" + msg,
e);
+                                onException("Failed to connect to next node [msg=" + msg
+ ", err=" + e + ']', e);
 
                                 if (!openSock)
                                     break; // Don't retry if we can not establish connection.
@@ -2874,8 +2874,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                                 U.error(log, "Failed to send message to next node [next="
+ next.id() + ", msg=" + msg +
                                     ", err=" + e + ']', e);
 
-                            onException("Failed to send message to next node [next=" + next.id()
+ ", msg="
-                                + msg + ']', e);
+                            onException("Failed to send message to next node [next=" + next.id()
+ ", msg=" + msg + ']', 
+                                e);
 
                             if (e instanceof SocketTimeoutException || X.hasCause(e, SocketTimeoutException.class))
{
                                 ackTimeout0 *= 2;
@@ -3040,7 +3040,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                             log.debug("Failed to send loopback problem message to node "
+
                                 "[node=" + node + ", err=" + e.getMessage() + ']');
 
-                        onException("Failed to send loopback problem message to node=" +
node, e);
+                        onException("Failed to send loopback problem message to node " +
+                            "[node=" + node + ", err=" + e.getMessage() + ']', e);
                     }
 
                     // Ignore join request.
@@ -3118,7 +3119,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                                     log.debug("Failed to send unauthenticated message to
node " +
                                         "[node=" + node + ", err=" + e.getMessage() + ']');
 
-                                onException("Failed to send unauthenticated message to node="
+ node, e);
+                                onException("Failed to send unauthenticated message to node
" +
+                                    "[node=" + node + ", err=" + e.getMessage() + ']', e);
                             }
 
                             // Ignore join request.
@@ -3169,7 +3171,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                             log.debug("Failed to authenticate node (will ignore join request)
[node=" + node +
                                 ", err=" + e + ']');
 
-                        onException("Failed to authenticate node (will ignore join request).
Node=" + node, e);
+                        onException("Failed to authenticate node (will ignore join request)
[node=" + node +
+                            ", err=" + e + ']', e);
 
                         // Ignore join request.
                         return;
@@ -3206,7 +3209,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                             log.debug("Failed to send hash ID resolver validation failed
message to node " +
                                 "[node=" + node + ", err=" + e.getMessage() + ']');
 
-                        onException("Failed to send hash ID resolver validation failed message
to node=" + node, e);
+                        onException("Failed to send hash ID resolver validation failed message
to node " +
+                            "[node=" + node + ", err=" + e.getMessage() + ']', e);
                     }
 
                     // Ignore join request.
@@ -3251,7 +3255,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                                 log.debug("Failed to send version check failed message to
node " +
                                     "[node=" + node + ", err=" + e.getMessage() + ']');
 
-                            onException("Failed to send version check failed message to node="
+ node, e);
+                            onException("Failed to send version check failed message to node
" +
+                                "[node=" + node + ", err=" + e.getMessage() + ']', e);
                         }
 
                         // Ignore join request.
@@ -3307,7 +3312,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                                 log.debug("Failed to send version check failed message to
node " +
                                     "[node=" + node + ", err=" + e.getMessage() + ']');
 
-                            onException("Failed to send version check failed message to node="
+ node, e);
+                            onException("Failed to send version check failed message to node
" +
+                                "[node=" + node + ", err=" + e.getMessage() + ']', e);
                         }
 
                         // Ignore join request.
@@ -3350,7 +3356,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                             log.debug("Failed to send marshaller check failed message to
node " +
                                 "[node=" + node + ", err=" + e.getMessage() + ']');
 
-                        onException("Failed to send marshaller check failed message to node="
+ node, e);
+                        onException("Failed to send marshaller check failed message to node
" +
+                            "[node=" + node + ", err=" + e.getMessage() + ']', e);
                     }
 
                     // Ignore join request.
@@ -3589,7 +3596,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                                     log.debug("Failed to send unauthenticated message to
node " +
                                         "[node=" + node + ", err=" + e.getMessage() + ']');
 
-                                onException("Failed to send unauthenticated message to node="
+ node, e);
+                                onException("Failed to send unauthenticated message to node
" +
+                                    "[node=" + node + ", err=" + e.getMessage() + ']', e);
                             }
 
                             addMessage(new TcpDiscoveryNodeFailedMessage(locNodeId, node.id(),
@@ -3791,7 +3799,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                         log.debug("Failed to register new node address [node=" + node +
                             ", err=" + e.getMessage() + ']');
 
-                    onException("Failed to register new node address " + node, e);
+                    onException("Failed to register new node address [node=" + node +
+                        ", err=" + e.getMessage() + ']', e);
                 }
             }
 
@@ -3966,7 +3975,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                             log.debug("Failed to send verified node left message to leaving
node [msg=" + msg +
                                 ", err=" + e.getMessage() + ']');
 
-                        onException("Failed to send verified node left message to leaving
node, msg=" + msg, e);
+                        onException("Failed to send verified node left message to leaving
node [msg=" + msg +
+                            ", err=" + e.getMessage() + ']', e);
                     }
                     finally {
                         forceSndPending = true;
@@ -4103,7 +4113,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                                 log.debug("Failed to unregister failed node address [node="
+ node +
                                     ", err=" + e.getMessage() + ']');
 
-                            onException("Failed to unregister failed node address, node="
+ node, e);
+                            onException("Failed to unregister failed node address [node="
+ node +
+                                ", err=" + e.getMessage() + ']', e);
                         }
                     }
 
@@ -4688,6 +4699,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                     if (log.isDebugEnabled())
                         U.error(log, "Caught exception on handshake [err=" + e +", sock="
+ sock + ']', e);
 
+                    onException("Caught exception on handshake [err=" + e +", sock=" + sock
+ ']', e);
+
                     if (e.hasCause(SocketTimeoutException.class))
                         LT.warn(log, null, "Socket operation timed out on handshake " +
                             "(consider increasing 'networkTimeout' configuration property)
" +
@@ -4704,8 +4717,6 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                         (!sock.isClosed() && !e.hasCause(IOException.class)))
                         LT.error(log, e, "Failed to initialize connection [sock=" + sock
+ ']');
 
-                    onException("Caught exception on handshake. Sock=" + sock, e);
-
                     return;
                 }
 
@@ -4900,6 +4911,9 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                             U.error(log, "Caught exception on message read [sock=" + sock
+
                                 ", locNodeId=" + locNodeId + ", rmtNodeId=" + nodeId + ']',
e);
 
+                        onException("Caught exception on message read [sock=" + sock +
+                            ", locNodeId=" + locNodeId + ", rmtNodeId=" + nodeId + ']', e);
+
                         if (isInterrupted() || sock.isClosed())
                             return;
 
@@ -4917,9 +4931,6 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                             LT.error(log, e, "Failed to read message [sock=" + sock + ",
locNodeId=" + locNodeId +
                                 ", rmtNodeId=" + nodeId + ']');
 
-                        onException("Caught exception on message read [sock=" + sock +
-                            ", locNodeId=" + locNodeId + ", rmtNodeId=" + nodeId + ']', e);
-
                         return;
                     }
                     catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8070f575/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteExceptionRegistrySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteExceptionRegistrySelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteExceptionRegistrySelfTest.java
index 14320f5..5fa443d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteExceptionRegistrySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteExceptionRegistrySelfTest.java
@@ -47,7 +47,7 @@ public class IgniteExceptionRegistrySelfTest extends GridCommonAbstractTest
{
         for (int i = 0; i < expCnt; i++)
             registry.onException("Test " + i, new Exception("Test " + i));
 
-        Collection<IgniteExceptionRegistry.IgniteExceptionInfo> exceptions = registry.getErrors();
+        Collection<IgniteExceptionRegistry.ExceptionInfo> exceptions = registry.getErrors();
 
         assertEquals(expCnt, registry.getErrors().size());
         assertEquals(expCnt, registry.getErrors().size());
@@ -55,7 +55,7 @@ public class IgniteExceptionRegistrySelfTest extends GridCommonAbstractTest
{
 
         int i = expCnt - 1;
 
-        for (IgniteExceptionRegistry.IgniteExceptionInfo e : exceptions) {
+        for (IgniteExceptionRegistry.ExceptionInfo e : exceptions) {
             assertNotNull(e);
             assertEquals(e.message(), "Test " + i);
             assertEquals(e.threadId(), Thread.currentThread().getId());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8070f575/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
b/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
index ff8cee4..298e700 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java
@@ -531,7 +531,7 @@ public class GridSpiTestContext implements IgniteSpiContext {
 
     /** {@inheritDoc} */
     @Override public IgniteExceptionRegistry exceptionRegistry() {
-        return null;
+        return IgniteExceptionRegistry.DUMMY_REGISTRY;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8070f575/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 05b6f80..4b5244c 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
@@ -20,6 +20,7 @@ package org.apache.ignite.testframework.junits;
 import org.apache.ignite.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.testframework.*;
 
@@ -38,7 +39,7 @@ public class GridTestKernalContext extends GridKernalContextImpl {
             new IgniteKernal(null),
             new IgniteConfiguration(),
             new GridKernalGatewayImpl(null),
-            null,
+            IgniteExceptionRegistry.DUMMY_REGISTRY,
             null,
             null,
             null,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8070f575/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java
index 8d36413..941b06e 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteUtilSelfTestSuite.java
@@ -51,6 +51,7 @@ public class IgniteUtilSelfTestSuite extends TestSuite {
         suite.addTestSuite(GridMBeanSelfTest.class);
         suite.addTestSuite(GridLongListSelfTest.class);
         suite.addTestSuite(GridCacheUtilsSelfTest.class);
+        suite.addTestSuite(IgniteExceptionRegistrySelfTest.class);
 
         // Metrics.
         suite.addTestSuite(ClusterMetricsSnapshotSerializeSelfTest.class);


Mime
View raw message