Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 242E599F8 for ; Fri, 12 Dec 2014 09:29:52 +0000 (UTC) Received: (qmail 52660 invoked by uid 500); 12 Dec 2014 09:29:52 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 52630 invoked by uid 500); 12 Dec 2014 09:29:52 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 52614 invoked by uid 99); 12 Dec 2014 09:29:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Dec 2014 09:29:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 12 Dec 2014 09:29:23 +0000 Received: (qmail 46434 invoked by uid 99); 12 Dec 2014 09:29:03 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Dec 2014 09:29:03 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 327AAA289A5; Fri, 12 Dec 2014 09:29:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.incubator.apache.org Date: Fri, 12 Dec 2014 09:29:09 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [08/67] [abbrv] [partial] incubator-ignite git commit: Rename GridException to IgniteCheckedException, GridRuntimeException to IgniteException. X-Virus-Checked: Checked by ClamAV on apache.org http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromTaskSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromTaskSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromTaskSelfTest.java index 1fe07ee..3e7c8a8 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromTaskSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromTaskSelfTest.java @@ -119,9 +119,9 @@ public class GridSessionCancelSiblingsFromTaskSelfTest extends GridCommonAbstrac /** * @param num Task number. * @throws InterruptedException If interrupted. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ - private void checkTask(int num) throws InterruptedException, GridException { + private void checkTask(int num) throws InterruptedException, IgniteCheckedException { Ignite ignite = G.ignite(getTestGridName()); ComputeTaskFuture fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class, num); @@ -187,7 +187,7 @@ public class GridSessionCancelSiblingsFromTaskSelfTest extends GridCommonAbstrac private volatile int taskNum = -1; /** {@inheritDoc} */ - @Override protected Collection split(int gridSize, Serializable arg) throws GridException { + @Override protected Collection split(int gridSize, Serializable arg) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Splitting job [job=" + this + ", gridSize=" + gridSize + ", arg=" + arg + ']'); @@ -259,7 +259,7 @@ public class GridSessionCancelSiblingsFromTaskSelfTest extends GridCommonAbstrac /** {@inheritDoc} */ @SuppressWarnings("deprecation") @Override public ComputeJobResultPolicy result(ComputeJobResult result, List received) - throws GridException { + throws IgniteCheckedException { if (received.size() == 1) { Collection jobSiblings = taskSes.getJobSiblings(); @@ -278,7 +278,7 @@ public class GridSessionCancelSiblingsFromTaskSelfTest extends GridCommonAbstrac } /** {@inheritDoc} */ - @Override public String reduce(List results) throws GridException { + @Override public String reduce(List results) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Aggregating job [job=" + this + ", results=" + results + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCheckpointAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCheckpointAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCheckpointAbstractSelfTest.java index 433a517..f98e038 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCheckpointAbstractSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCheckpointAbstractSelfTest.java @@ -147,7 +147,7 @@ public abstract class GridSessionCheckpointAbstractSelfTest extends GridCommonAb private IgniteMarshaller marshaller; /** {@inheritDoc} */ - @Override protected Collection split(int gridSize, Object arg) throws GridException { + @Override protected Collection split(int gridSize, Object arg) throws IgniteCheckedException { for (int i = 0; i < SPLIT_COUNT; i++) { ses.saveCheckpoint("map:session:key:" + i, "map:session:testval:" + i); ses.saveCheckpoint("map:global:key:" + i, "map:global:testval:" + i, @@ -162,7 +162,7 @@ public abstract class GridSessionCheckpointAbstractSelfTest extends GridCommonAb private static final long serialVersionUID = -9118687978815477993L; /** {@inheritDoc} */ - @Override public Serializable execute() throws GridException { + @Override public Serializable execute() throws IgniteCheckedException { ses.saveCheckpoint("job:session:key:" + argument(0), "job:session:testval:" + argument(0)); ses.saveCheckpoint("job:global:key:" + argument(0), "job:global:testval:" + argument(0), ComputeTaskSessionScope.GLOBAL_SCOPE, 0); @@ -176,7 +176,7 @@ public abstract class GridSessionCheckpointAbstractSelfTest extends GridCommonAb } /** {@inheritDoc} */ - @Override public Object reduce(List results) throws GridException { + @Override public Object reduce(List results) throws IgniteCheckedException { int res = 0; for (ComputeJobResult result : results) { @@ -194,7 +194,7 @@ public abstract class GridSessionCheckpointAbstractSelfTest extends GridCommonAb Thread.sleep(200); } catch (InterruptedException e) { - throw new GridException("Got interrupted during reducing.", e); + throw new IgniteCheckedException("Got interrupted during reducing.", e); } try { @@ -214,7 +214,7 @@ public abstract class GridSessionCheckpointAbstractSelfTest extends GridCommonAb } } catch (Exception e) { - throw new GridException("Running state check failure.", e); + throw new IgniteCheckedException("Running state check failure.", e); } return res; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCollisionSpiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCollisionSpiSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCollisionSpiSelfTest.java index e9d21ce..df5c765 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCollisionSpiSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCollisionSpiSelfTest.java @@ -60,7 +60,7 @@ public class GridSessionCollisionSpiSelfTest extends GridCommonAbstractTest { @ComputeTaskSessionFullSupport private static class GridSessionTestTask extends ComputeTaskSplitAdapter { /** {@inheritDoc} */ - @Override protected Collection split(int gridSize, Object arg) throws GridException { + @Override protected Collection split(int gridSize, Object arg) throws IgniteCheckedException { Collection jobs = new ArrayList<>(gridSize); for (int i = 0; i < gridSize; i++) { @@ -98,7 +98,7 @@ public class GridSessionCollisionSpiSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ - @Override public Object reduce(List results) throws GridException { + @Override public Object reduce(List results) throws IgniteCheckedException { // Nothing to reduce. return null; } @@ -125,7 +125,7 @@ public class GridSessionCollisionSpiSelfTest extends GridCommonAbstractTest { if (log.isInfoEnabled()) log.info("Set session attribute for job: " + jobId); } - catch (GridException e) { + catch (IgniteCheckedException e) { log.error("Failed to set session attribute: " + job, e); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitJobAttributeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitJobAttributeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitJobAttributeSelfTest.java index 5661431..9860c30 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitJobAttributeSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitJobAttributeSelfTest.java @@ -98,9 +98,9 @@ public class GridSessionFutureWaitJobAttributeSelfTest extends GridCommonAbstrac /** * @param num Number. * @throws InterruptedException if failed. - * @throws GridException if failed. + * @throws IgniteCheckedException if failed. */ - private void checkTask(int num) throws InterruptedException, GridException { + private void checkTask(int num) throws InterruptedException, IgniteCheckedException { Ignite ignite = G.ignite(getTestGridName()); IgniteCompute comp = ignite.compute().enableAsync(); @@ -166,7 +166,7 @@ public class GridSessionFutureWaitJobAttributeSelfTest extends GridCommonAbstrac private volatile int taskNum = -1; /** {@inheritDoc} */ - @Override protected Collection split(int gridSize, Serializable arg) throws GridException { + @Override protected Collection split(int gridSize, Serializable arg) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Splitting job [task=" + this + ", gridSize=" + gridSize + ", arg=" + arg + ']'); @@ -180,7 +180,7 @@ public class GridSessionFutureWaitJobAttributeSelfTest extends GridCommonAbstrac for (int i = 1; i <= SPLIT_COUNT; i++) { jobs.add(new ComputeJobAdapter(i) { - @Override public Serializable execute() throws GridException { + @Override public Serializable execute() throws IgniteCheckedException { assert taskSes != null; if (log.isInfoEnabled()) { @@ -216,7 +216,7 @@ public class GridSessionFutureWaitJobAttributeSelfTest extends GridCommonAbstrac /** {@inheritDoc} */ @Override public ComputeJobResultPolicy result(ComputeJobResult res, List received) - throws GridException { + throws IgniteCheckedException { if (res.getException() != null) throw res.getException(); @@ -224,7 +224,7 @@ public class GridSessionFutureWaitJobAttributeSelfTest extends GridCommonAbstrac } /** {@inheritDoc} */ - @Override public Integer reduce(List results) throws GridException { + @Override public Integer reduce(List results) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Reducing job [job=" + this + ", results=" + results + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitTaskAttributeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitTaskAttributeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitTaskAttributeSelfTest.java index 56d3053..a46e37b 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitTaskAttributeSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionFutureWaitTaskAttributeSelfTest.java @@ -98,9 +98,9 @@ public class GridSessionFutureWaitTaskAttributeSelfTest extends GridCommonAbstra /** * @param num Number. * @throws InterruptedException if failed. - * @throws GridException if failed. + * @throws IgniteCheckedException if failed. */ - private void checkTask(int num) throws InterruptedException, GridException { + private void checkTask(int num) throws InterruptedException, IgniteCheckedException { Ignite ignite = G.ignite(getTestGridName()); ComputeTaskFuture fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class.getName(), num); @@ -163,7 +163,7 @@ public class GridSessionFutureWaitTaskAttributeSelfTest extends GridCommonAbstra private volatile int taskNum = -1; /** {@inheritDoc} */ - @Override protected Collection split(int gridSize, Serializable arg) throws GridException { + @Override protected Collection split(int gridSize, Serializable arg) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Splitting job [job=" + this + ", gridSize=" + gridSize + ", arg=" + arg + ']'); @@ -193,7 +193,7 @@ public class GridSessionFutureWaitTaskAttributeSelfTest extends GridCommonAbstra /** {@inheritDoc} */ @Override public ComputeJobResultPolicy result(ComputeJobResult res, List received) - throws GridException { + throws IgniteCheckedException { if (res.getException() != null) throw res.getException(); @@ -223,7 +223,7 @@ public class GridSessionFutureWaitTaskAttributeSelfTest extends GridCommonAbstra } /** {@inheritDoc} */ - @Override public Integer reduce(List results) throws GridException { + @Override public Integer reduce(List results) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Reducing job [job=" + this + ", results=" + results + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobFailoverSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobFailoverSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobFailoverSelfTest.java index d558bec..2a0493f 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobFailoverSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobFailoverSelfTest.java @@ -77,7 +77,7 @@ public class GridSessionJobFailoverSelfTest extends GridCommonAbstractTest { private boolean jobFailed; /** {@inheritDoc} */ - @Override public Map map(List subgrid, String arg) throws GridException { + @Override public Map map(List subgrid, String arg) throws IgniteCheckedException { ses.setAttribute("fail", true); for (int i = 0; i < 10; i++) { @@ -90,14 +90,14 @@ public class GridSessionJobFailoverSelfTest extends GridCommonAbstractTest { @IgniteLocalNodeIdResource private UUID locNodeId; - @Override public Serializable execute() throws GridException { + @Override public Serializable execute() throws IgniteCheckedException { boolean fail; try { fail = ses.waitForAttribute("fail", 0); } catch (InterruptedException e) { - throw new GridException("Got interrupted while waiting for attribute to be set.", e); + throw new IgniteCheckedException("Got interrupted while waiting for attribute to be set.", e); } if (fail) { @@ -108,7 +108,7 @@ public class GridSessionJobFailoverSelfTest extends GridCommonAbstractTest { ses.setAttribute("test.job.attr." + i, ii); } - throw new GridException("Job exception."); + throw new IgniteCheckedException("Job exception."); } try { @@ -125,7 +125,7 @@ public class GridSessionJobFailoverSelfTest extends GridCommonAbstractTest { } } catch (InterruptedException e) { - throw new GridException("Got interrupted while waiting for attribute to be set.", e); + throw new IgniteCheckedException("Got interrupted while waiting for attribute to be set.", e); } // This job does not return any result. @@ -136,7 +136,7 @@ public class GridSessionJobFailoverSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override public ComputeJobResultPolicy result(ComputeJobResult res, List received) - throws GridException { + throws IgniteCheckedException { if (res.getException() != null) { assert !jobFailed; @@ -149,7 +149,7 @@ public class GridSessionJobFailoverSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ - @Override public Object reduce(List results) throws GridException { + @Override public Object reduce(List results) throws IgniteCheckedException { assert results.size() == 1; return results.get(0).getData(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobWaitTaskAttributeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobWaitTaskAttributeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobWaitTaskAttributeSelfTest.java index f86e815..729f7ef 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobWaitTaskAttributeSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionJobWaitTaskAttributeSelfTest.java @@ -100,9 +100,9 @@ public class GridSessionJobWaitTaskAttributeSelfTest extends GridCommonAbstractT /** * @param num Number. - * @throws GridException if failed. + * @throws IgniteCheckedException if failed. */ - private void checkTask(int num) throws GridException { + private void checkTask(int num) throws IgniteCheckedException { Ignite ignite = G.ignite(getTestGridName()); ComputeTaskFuture fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class.getName(), null); @@ -130,7 +130,7 @@ public class GridSessionJobWaitTaskAttributeSelfTest extends GridCommonAbstractT private ComputeTaskSession taskSes; /** {@inheritDoc} */ - @Override protected Collection split(int gridSize, Serializable arg) throws GridException { + @Override protected Collection split(int gridSize, Serializable arg) throws IgniteCheckedException { assert taskSes != null; if (log.isInfoEnabled()) @@ -140,7 +140,7 @@ public class GridSessionJobWaitTaskAttributeSelfTest extends GridCommonAbstractT for (int i = 1; i <= SPLIT_COUNT; i++) { jobs.add(new ComputeJobAdapter(i) { - @Override public Serializable execute() throws GridException { + @Override public Serializable execute() throws IgniteCheckedException { assert taskSes != null; if (log.isInfoEnabled()) @@ -159,7 +159,7 @@ public class GridSessionJobWaitTaskAttributeSelfTest extends GridCommonAbstractT fail("Invalid test session value: " + val); } catch (InterruptedException e) { - throw new GridException("Failed to get attribute due to interruption.", e); + throw new IgniteCheckedException("Failed to get attribute due to interruption.", e); } } @@ -173,7 +173,7 @@ public class GridSessionJobWaitTaskAttributeSelfTest extends GridCommonAbstractT /** {@inheritDoc} */ @Override public ComputeJobResultPolicy result(ComputeJobResult result, List received) - throws GridException { + throws IgniteCheckedException { if (result.getException() != null) throw result.getException(); @@ -189,7 +189,7 @@ public class GridSessionJobWaitTaskAttributeSelfTest extends GridCommonAbstractT } /** {@inheritDoc} */ - @Override public Integer reduce(List results) throws GridException { + @Override public Integer reduce(List results) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Reducing job [job=" + this + ", results=" + results + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionLoadSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionLoadSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionLoadSelfTest.java index 28a66d4..3bff818 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionLoadSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionLoadSelfTest.java @@ -127,7 +127,7 @@ public class GridSessionLoadSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override public Map map(List subgrid, Integer arg) - throws GridException { + throws IgniteCheckedException { assert taskSes != null; assert arg != null; assert arg > 1; @@ -163,7 +163,7 @@ public class GridSessionLoadSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ - @Override public Boolean reduce(List results) throws GridException { + @Override public Boolean reduce(List results) throws IgniteCheckedException { assert taskSes != null; assert results != null; assert params != null; @@ -228,7 +228,7 @@ public class GridSessionLoadSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ - @Override public Serializable execute() throws GridException { + @Override public Serializable execute() throws IgniteCheckedException { assert taskSes != null; assert argument(0) != null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeSelfTest.java index ca86b7c..27906d0 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeSelfTest.java @@ -113,9 +113,9 @@ public class GridSessionSetFutureAttributeSelfTest extends GridCommonAbstractTes /** * @param num Number. * @throws InterruptedException if failed. - * @throws GridException if failed. + * @throws IgniteCheckedException if failed. */ - private void checkTask(int num) throws InterruptedException, GridException { + private void checkTask(int num) throws InterruptedException, IgniteCheckedException { Ignite ignite = G.ignite(getTestGridName()); ComputeTaskFuture fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class, num); @@ -170,7 +170,7 @@ public class GridSessionSetFutureAttributeSelfTest extends GridCommonAbstractTes private volatile int taskNum = -1; /** {@inheritDoc} */ - @Override protected Collection split(int gridSize, Serializable arg) throws GridException { + @Override protected Collection split(int gridSize, Serializable arg) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Splitting job [task=" + this + ", gridSize=" + gridSize + ", arg=" + arg + ']'); @@ -185,7 +185,7 @@ public class GridSessionSetFutureAttributeSelfTest extends GridCommonAbstractTes for (int i = 1; i <= SPLIT_COUNT; i++) { jobs.add(new ComputeJobAdapter(i) { /** {@inheritDoc} */ - @Override public Serializable execute() throws GridException { + @Override public Serializable execute() throws IgniteCheckedException { assert taskSes != null; if (log.isInfoEnabled()) @@ -206,7 +206,7 @@ public class GridSessionSetFutureAttributeSelfTest extends GridCommonAbstractTes return 1; } catch (InterruptedException e) { - throw new GridException("Failed to get attribute due to interruption.", e); + throw new IgniteCheckedException("Failed to get attribute due to interruption.", e); } return 0; @@ -219,7 +219,7 @@ public class GridSessionSetFutureAttributeSelfTest extends GridCommonAbstractTes /** {@inheritDoc} */ @Override public ComputeJobResultPolicy result(ComputeJobResult result, List received) - throws GridException { + throws IgniteCheckedException { if (result.getException() != null) throw result.getException(); @@ -227,7 +227,7 @@ public class GridSessionSetFutureAttributeSelfTest extends GridCommonAbstractTes } /** {@inheritDoc} */ - @Override public Integer reduce(List results) throws GridException { + @Override public Integer reduce(List results) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Reducing job [job=" + this + ", results=" + results + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeWaitListenerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeWaitListenerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeWaitListenerSelfTest.java index 15b9b95..9c780fb 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeWaitListenerSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetFutureAttributeWaitListenerSelfTest.java @@ -132,7 +132,7 @@ public class GridSessionSetFutureAttributeWaitListenerSelfTest extends GridCommo private ComputeTaskSession taskSes; /** {@inheritDoc} */ - @Override protected Collection split(int gridSize, Serializable arg) throws GridException { + @Override protected Collection split(int gridSize, Serializable arg) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Splitting job [job=" + this + ", gridSize=" + gridSize + ", arg=" + arg + ']'); @@ -141,7 +141,7 @@ public class GridSessionSetFutureAttributeWaitListenerSelfTest extends GridCommo for (int i = 1; i <= SPLIT_COUNT; i++) { jobs.add(new ComputeJobAdapter(i) { @SuppressWarnings({"UnconditionalWait"}) - public Serializable execute() throws GridException { + public Serializable execute() throws IgniteCheckedException { assert taskSes != null; if (log.isInfoEnabled()) @@ -160,7 +160,7 @@ public class GridSessionSetFutureAttributeWaitListenerSelfTest extends GridCommo return 1; } catch (InterruptedException e) { - throw new GridException("Failed to wait for listener due to interruption.", e); + throw new IgniteCheckedException("Failed to wait for listener due to interruption.", e); } } }); @@ -171,7 +171,7 @@ public class GridSessionSetFutureAttributeWaitListenerSelfTest extends GridCommo /** {@inheritDoc} */ @Override public ComputeJobResultPolicy result(ComputeJobResult res, List received) - throws GridException { + throws IgniteCheckedException { if (res.getException() != null) throw res.getException(); @@ -179,7 +179,7 @@ public class GridSessionSetFutureAttributeWaitListenerSelfTest extends GridCommo } /** {@inheritDoc} */ - @Override public Integer reduce(List results) throws GridException { + @Override public Integer reduce(List results) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Reducing job [job=" + this + ", results=" + results + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttribute2SelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttribute2SelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttribute2SelfTest.java index 78fde46..db09475 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttribute2SelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttribute2SelfTest.java @@ -66,7 +66,7 @@ public class GridSessionSetJobAttribute2SelfTest extends GridCommonAbstractTest private UUID attrVal; /** {@inheritDoc} */ - @Override public Map map(List subgrid, UUID arg) throws GridException { + @Override public Map map(List subgrid, UUID arg) throws IgniteCheckedException { assert subgrid.size() == 2; assert arg != null; @@ -83,12 +83,12 @@ public class GridSessionSetJobAttribute2SelfTest extends GridCommonAbstractTest } /** {@inheritDoc} */ - @Override public Object reduce(List results) throws GridException { + @Override public Object reduce(List results) throws IgniteCheckedException { try { Thread.sleep(100); } catch (InterruptedException e) { - throw new GridException("Got interrupted while while sleeping.", e); + throw new IgniteCheckedException("Got interrupted while while sleeping.", e); } Serializable ser = taskSes.getAttribute(TEST_ATTR_KEY); @@ -115,7 +115,7 @@ public class GridSessionSetJobAttribute2SelfTest extends GridCommonAbstractTest } /** {@inheritDoc} */ - @Override public Serializable execute() throws GridException { + @Override public Serializable execute() throws IgniteCheckedException { assert taskSes != null; assert argument(0) != null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeOrderSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeOrderSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeOrderSelfTest.java index 0aad252..e84d8f3 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeOrderSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeOrderSelfTest.java @@ -78,7 +78,7 @@ public class GridSessionSetJobAttributeOrderSelfTest extends GridCommonAbstractT private IgniteLogger log; /** {@inheritDoc} */ - @Override public Map map(List subgrid, UUID arg) throws GridException { + @Override public Map map(List subgrid, UUID arg) throws IgniteCheckedException { assert subgrid.size() == 2; assert arg != null; @@ -93,7 +93,7 @@ public class GridSessionSetJobAttributeOrderSelfTest extends GridCommonAbstractT } /** {@inheritDoc} */ - @Override public Serializable reduce(List results) throws GridException { + @Override public Serializable reduce(List results) throws IgniteCheckedException { try { if (taskSes.waitForAttribute(TEST_ATTR_KEY, SETS_ATTR_COUNT, 20000)) { log.info("Successfully waited for attribute [key=" + TEST_ATTR_KEY + @@ -101,7 +101,7 @@ public class GridSessionSetJobAttributeOrderSelfTest extends GridCommonAbstractT } } catch (InterruptedException e) { - throw new GridException("Got interrupted while waiting for attribute to be set.", e); + throw new IgniteCheckedException("Got interrupted while waiting for attribute to be set.", e); } return taskSes.getAttribute(TEST_ATTR_KEY); @@ -119,7 +119,7 @@ public class GridSessionSetJobAttributeOrderSelfTest extends GridCommonAbstractT private IgniteLogger log; /** {@inheritDoc} */ - @Override public Serializable execute() throws GridException { + @Override public Serializable execute() throws IgniteCheckedException { assert taskSes != null; try { @@ -128,7 +128,7 @@ public class GridSessionSetJobAttributeOrderSelfTest extends GridCommonAbstractT assert attr : "Failed to wait for attribute value."; } catch (InterruptedException e) { - throw new GridException("Got interrupted while waiting for attribute to be set.", e); + throw new IgniteCheckedException("Got interrupted while waiting for attribute to be set.", e); } Integer res = taskSes.getAttribute(TEST_ATTR_KEY); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeSelfTest.java index d863dcd..165cc9d 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeSelfTest.java @@ -101,9 +101,9 @@ public class GridSessionSetJobAttributeSelfTest extends GridCommonAbstractTest { /** * @param num Number. - * @throws GridException if failed. + * @throws IgniteCheckedException if failed. */ - private void checkTask(int num) throws GridException { + private void checkTask(int num) throws IgniteCheckedException { Ignite ignite = G.ignite(getTestGridName()); ComputeTaskFuture fut = executeAsync(ignite.compute(), GridTaskSessionTestTask.class, num); @@ -127,7 +127,7 @@ public class GridSessionSetJobAttributeSelfTest extends GridCommonAbstractTest { private ComputeTaskSession taskSes; /** {@inheritDoc} */ - @Override protected Collection split(int gridSize, Serializable arg) throws GridException { + @Override protected Collection split(int gridSize, Serializable arg) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Splitting job [job=" + this + ", gridSize=" + gridSize + ", arg=" + arg + ']'); @@ -135,7 +135,7 @@ public class GridSessionSetJobAttributeSelfTest extends GridCommonAbstractTest { for (int i = 1; i <= SPLIT_COUNT; i++) { jobs.add(new ComputeJobAdapter(i) { - @Override public Serializable execute() throws GridException { + @Override public Serializable execute() throws IgniteCheckedException { assert taskSes != null; int arg = this.argument(0); @@ -160,7 +160,7 @@ public class GridSessionSetJobAttributeSelfTest extends GridCommonAbstractTest { return 1; } catch (InterruptedException e) { - throw new GridException("Failed to get attribute due to interruption.", e); + throw new IgniteCheckedException("Failed to get attribute due to interruption.", e); } } @@ -174,7 +174,7 @@ public class GridSessionSetJobAttributeSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override public ComputeJobResultPolicy result(ComputeJobResult result, List received) - throws GridException { + throws IgniteCheckedException { if (result.getException() != null) throw result.getException(); @@ -182,7 +182,7 @@ public class GridSessionSetJobAttributeSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ - @Override public Integer reduce(List results) throws GridException { + @Override public Integer reduce(List results) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Reducing job [job=" + this + ", results=" + results + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeWaitListenerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeWaitListenerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeWaitListenerSelfTest.java index 901af85..7a9fe4b 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeWaitListenerSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetJobAttributeWaitListenerSelfTest.java @@ -120,7 +120,7 @@ public class GridSessionSetJobAttributeWaitListenerSelfTest extends GridCommonAb private ComputeTaskSession taskSes; /** {@inheritDoc} */ - @Override protected Collection split(int gridSize, Serializable arg) throws GridException { + @Override protected Collection split(int gridSize, Serializable arg) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Splitting job [job=" + this + ", gridSize=" + gridSize + ", arg=" + arg + ']'); @@ -129,7 +129,7 @@ public class GridSessionSetJobAttributeWaitListenerSelfTest extends GridCommonAb for (int i = 1; i <= SPLIT_COUNT; i++) { jobs.add(new ComputeJobAdapter(i) { @SuppressWarnings({"UnconditionalWait"}) - public Serializable execute() throws GridException { + public Serializable execute() throws IgniteCheckedException { assert taskSes != null; if (log.isInfoEnabled()) @@ -158,7 +158,7 @@ public class GridSessionSetJobAttributeWaitListenerSelfTest extends GridCommonAb return lsnr.getAttributes().size() == 0 ? 0 : 1; } catch (InterruptedException e) { - throw new GridException("Failed to wait for listener due to interruption.", e); + throw new IgniteCheckedException("Failed to wait for listener due to interruption.", e); } } }); @@ -168,7 +168,7 @@ public class GridSessionSetJobAttributeWaitListenerSelfTest extends GridCommonAb } /** {@inheritDoc} */ - @Override public ComputeJobResultPolicy result(ComputeJobResult result, List received) throws GridException { + @Override public ComputeJobResultPolicy result(ComputeJobResult result, List received) throws IgniteCheckedException { if (result.getException() != null) throw result.getException(); @@ -176,7 +176,7 @@ public class GridSessionSetJobAttributeWaitListenerSelfTest extends GridCommonAb } /** {@inheritDoc} */ - @Override public Integer reduce(List results) throws GridException { + @Override public Integer reduce(List results) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Reducing job [job=" + this + ", results=" + results + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetTaskAttributeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetTaskAttributeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetTaskAttributeSelfTest.java index 29440de..56c9328 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetTaskAttributeSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionSetTaskAttributeSelfTest.java @@ -83,9 +83,9 @@ public class GridSessionSetTaskAttributeSelfTest extends GridCommonAbstractTest /** * @param num Number. - * @throws GridException if failed. + * @throws IgniteCheckedException if failed. */ - private void checkTask(int num) throws GridException { + private void checkTask(int num) throws IgniteCheckedException { Ignite ignite = G.ignite(getTestGridName()); IgniteCompute comp = ignite.compute().enableAsync(); @@ -113,7 +113,7 @@ public class GridSessionSetTaskAttributeSelfTest extends GridCommonAbstractTest private ComputeTaskSession taskSes; /** {@inheritDoc} */ - @Override protected Collection split(int gridSize, Serializable arg) throws GridException { + @Override protected Collection split(int gridSize, Serializable arg) throws IgniteCheckedException { assert taskSes != null; if (log.isInfoEnabled()) @@ -123,7 +123,7 @@ public class GridSessionSetTaskAttributeSelfTest extends GridCommonAbstractTest for (int i = 1; i <= SPLIT_COUNT; i++) { jobs.add(new ComputeJobAdapter(i) { - @Override public Serializable execute() throws GridException { + @Override public Serializable execute() throws IgniteCheckedException { assert taskSes != null; if (log.isInfoEnabled()) @@ -139,7 +139,7 @@ public class GridSessionSetTaskAttributeSelfTest extends GridCommonAbstractTest return 1; } catch (InterruptedException e) { - throw new GridException("Failed to get attribute due to interruption.", e); + throw new IgniteCheckedException("Failed to get attribute due to interruption.", e); } return 0; @@ -157,7 +157,7 @@ public class GridSessionSetTaskAttributeSelfTest extends GridCommonAbstractTest /** {@inheritDoc} */ @Override public ComputeJobResultPolicy result(ComputeJobResult result, List received) - throws GridException { + throws IgniteCheckedException { if (result.getException() != null) throw result.getException(); @@ -170,7 +170,7 @@ public class GridSessionSetTaskAttributeSelfTest extends GridCommonAbstractTest } /** {@inheritDoc} */ - @Override public Integer reduce(List results) throws GridException { + @Override public Integer reduce(List results) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Reducing job [job=" + this + ", results=" + results + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionTaskWaitJobAttributeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionTaskWaitJobAttributeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionTaskWaitJobAttributeSelfTest.java index 1eb56b6..b97d2f6 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionTaskWaitJobAttributeSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionTaskWaitJobAttributeSelfTest.java @@ -83,9 +83,9 @@ public class GridSessionTaskWaitJobAttributeSelfTest extends GridCommonAbstractT /** * @param num Number. - * @throws GridException if failed. + * @throws IgniteCheckedException if failed. */ - private void checkTask(int num) throws GridException { + private void checkTask(int num) throws IgniteCheckedException { Ignite ignite = G.ignite(getTestGridName()); IgniteCompute comp = ignite.compute().enableAsync(); @@ -113,7 +113,7 @@ public class GridSessionTaskWaitJobAttributeSelfTest extends GridCommonAbstractT private ComputeTaskSession taskSes; /** {@inheritDoc} */ - @Override protected Collection split(int gridSize, Serializable arg) throws GridException { + @Override protected Collection split(int gridSize, Serializable arg) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Splitting job [job=" + this + ", gridSize=" + gridSize + ", arg=" + arg + ']'); @@ -121,7 +121,7 @@ public class GridSessionTaskWaitJobAttributeSelfTest extends GridCommonAbstractT for (int i = 1; i <= SPLIT_COUNT; i++) { jobs.add(new ComputeJobAdapter(i) { - @Override public Object execute() throws GridException { + @Override public Object execute() throws IgniteCheckedException { assert taskSes != null; if (log.isInfoEnabled()) { @@ -143,7 +143,7 @@ public class GridSessionTaskWaitJobAttributeSelfTest extends GridCommonAbstractT /** {@inheritDoc} */ @Override public ComputeJobResultPolicy result(ComputeJobResult result, List received) - throws GridException { + throws IgniteCheckedException { if (result.getException() != null) throw result.getException(); @@ -156,14 +156,14 @@ public class GridSessionTaskWaitJobAttributeSelfTest extends GridCommonAbstractT assert "testVal".equals(val) : "Invalid attribute value: " + val; } catch (InterruptedException e) { - throw new GridException("Failed to get attribute due to interruption.", e); + throw new IgniteCheckedException("Failed to get attribute due to interruption.", e); } return received.size() == SPLIT_COUNT ? ComputeJobResultPolicy.REDUCE : ComputeJobResultPolicy.WAIT; } /** {@inheritDoc} */ - @Override public Integer reduce(List results) throws GridException { + @Override public Integer reduce(List results) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Reducing job [job=" + this + ", results=" + results + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionWaitAttributeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionWaitAttributeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionWaitAttributeSelfTest.java index 9e2cf06..e03e4b0 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionWaitAttributeSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionWaitAttributeSelfTest.java @@ -238,10 +238,10 @@ public class GridSessionWaitAttributeSelfTest extends GridCommonAbstractTest { * @param ses Session. * @param prefix Prefix. * @param type Type. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ private static void checkSessionAttributes(ComputeTaskSession ses, String prefix, WaitAttributeType type) - throws GridException { + throws IgniteCheckedException { assert ses != null; assert type != null; @@ -385,7 +385,7 @@ public class GridSessionWaitAttributeSelfTest extends GridCommonAbstractTest { } } catch (InterruptedException e) { - throw new GridException("Got interrupted while waiting for session attributes.", e); + throw new IgniteCheckedException("Got interrupted while waiting for session attributes.", e); } } @@ -393,7 +393,7 @@ public class GridSessionWaitAttributeSelfTest extends GridCommonAbstractTest { @ComputeTaskSessionFullSupport public static class TestSessionTask extends ComputeTaskSplitAdapter { /** {@inheritDoc} */ - @Override protected Collection split(int gridSize, WaitAttributeType type) throws GridException { + @Override protected Collection split(int gridSize, WaitAttributeType type) throws IgniteCheckedException { assert type != null; Collection jobs = new ArrayList<>(JOB_NUM); @@ -405,7 +405,7 @@ public class GridSessionWaitAttributeSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ - @Override public Object reduce(List results) throws GridException { + @Override public Object reduce(List results) throws IgniteCheckedException { return null; } } @@ -432,7 +432,7 @@ public class GridSessionWaitAttributeSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ - @Override public Serializable execute() throws GridException { + @Override public Serializable execute() throws IgniteCheckedException { WaitAttributeType m = argument(0); checkSessionAttributes(taskSes, "fut", m); @@ -464,7 +464,7 @@ public class GridSessionWaitAttributeSelfTest extends GridCommonAbstractTest { taskSes.waitForAttribute("done", true, 0); } catch (InterruptedException e) { - throw new GridException("Got interrupted while waiting for 'done' attribute.", e); + throw new IgniteCheckedException("Got interrupted while waiting for 'done' attribute.", e); } return null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/spi/GridSpiLocalHostInjectionTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/spi/GridSpiLocalHostInjectionTest.java b/modules/core/src/test/java/org/gridgain/grid/spi/GridSpiLocalHostInjectionTest.java index 2483ed4..8d4a4b2 100644 --- a/modules/core/src/test/java/org/gridgain/grid/spi/GridSpiLocalHostInjectionTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/spi/GridSpiLocalHostInjectionTest.java @@ -9,10 +9,10 @@ package org.gridgain.grid.spi; -import org.gridgain.grid.*; -import org.gridgain.grid.kernal.processors.resource.*; +import org.apache.ignite.*; import org.apache.ignite.spi.communication.tcp.*; import org.apache.ignite.spi.discovery.tcp.*; +import org.gridgain.grid.kernal.processors.resource.*; import org.gridgain.testframework.junits.*; import org.gridgain.testframework.junits.common.*; import org.jetbrains.annotations.*; @@ -28,58 +28,58 @@ public class GridSpiLocalHostInjectionTest extends GridCommonAbstractTest { public static final String SPI_LOCAL_ADDR_VALUE = "127.0.0.2"; /** - * @throws GridException If test fails. + * @throws IgniteCheckedException If test fails. */ - public void testTcpDiscoverySpiBothSet() throws GridException { + public void testTcpDiscoverySpiBothSet() throws IgniteCheckedException { processTcpDiscoverySpiTestInjection(true, true, SPI_LOCAL_ADDR_VALUE); } /** - * @throws GridException If test fails. + * @throws IgniteCheckedException If test fails. */ - public void testTcpDiscoverySpiOnlySet() throws GridException { + public void testTcpDiscoverySpiOnlySet() throws IgniteCheckedException { processTcpDiscoverySpiTestInjection(false, true, SPI_LOCAL_ADDR_VALUE); } /** - * @throws GridException If test fails. + * @throws IgniteCheckedException If test fails. */ - public void testTcpDiscoverySpiConfigOnlySet() throws GridException { + public void testTcpDiscoverySpiConfigOnlySet() throws IgniteCheckedException { processTcpDiscoverySpiTestInjection(true, false, CONFIG_LOCAL_ADDR_VALUE); } /** - * @throws GridException If test fails. + * @throws IgniteCheckedException If test fails. */ - public void testTcpDiscoverySpiBothNotSet() throws GridException { + public void testTcpDiscoverySpiBothNotSet() throws IgniteCheckedException { processTcpDiscoverySpiTestInjection(false, false, null); } /** - * @throws GridException If test fails. + * @throws IgniteCheckedException If test fails. */ - public void testTcpCommunicationSpiBothSet() throws GridException { + public void testTcpCommunicationSpiBothSet() throws IgniteCheckedException { processTcpCommunicationSpiTestInjection(true, true, SPI_LOCAL_ADDR_VALUE); } /** - * @throws GridException If test fails. + * @throws IgniteCheckedException If test fails. */ - public void testTcpCommunicationSpiOnlySet() throws GridException { + public void testTcpCommunicationSpiOnlySet() throws IgniteCheckedException { processTcpCommunicationSpiTestInjection(false, true, SPI_LOCAL_ADDR_VALUE); } /** - * @throws GridException If test fails. + * @throws IgniteCheckedException If test fails. */ - public void testTcpCommunicationSpiConfigOnlySet() throws GridException { + public void testTcpCommunicationSpiConfigOnlySet() throws IgniteCheckedException { processTcpCommunicationSpiTestInjection(true, false, CONFIG_LOCAL_ADDR_VALUE); } /** - * @throws GridException If test fails. + * @throws IgniteCheckedException If test fails. */ - public void testTcpCommunicationSpiBothNotSet() throws GridException { + public void testTcpCommunicationSpiBothNotSet() throws IgniteCheckedException { processTcpCommunicationSpiTestInjection(false, false, null); } @@ -89,10 +89,10 @@ public class GridSpiLocalHostInjectionTest extends GridCommonAbstractTest { * @param cfgVal {@code true} if {@code localHost} should be set in configuration adapter. * @param spiVal {@code true} if {@code localHost} should be set in SPI * @param exp Expected value of {@code localHost} property in SPI after injection. - * @throws GridException If test fails. + * @throws IgniteCheckedException If test fails. */ private void processTcpDiscoverySpiTestInjection(boolean cfgVal, boolean spiVal, @Nullable String exp) - throws GridException { + throws IgniteCheckedException { GridResourceProcessor proc = getResourceProcessor(cfgVal); TcpDiscoverySpi spi = new TcpDiscoverySpi(); @@ -111,10 +111,10 @@ public class GridSpiLocalHostInjectionTest extends GridCommonAbstractTest { * @param cfgVal {@code true} if {@code localHost} should be set in configuration adapter. * @param spiVal {@code true} if {@code localHost} should be set in SPI * @param exp Expected value of {@code localHost} property in SPI after injection. - * @throws GridException If test fails. + * @throws IgniteCheckedException If test fails. */ private void processTcpCommunicationSpiTestInjection(boolean cfgVal, boolean spiVal, @Nullable String exp) - throws GridException { + throws IgniteCheckedException { GridResourceProcessor proc = getResourceProcessor(cfgVal); TcpCommunicationSpi spi = new TcpCommunicationSpi(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/spi/GridTcpSpiForwardingSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/spi/GridTcpSpiForwardingSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/spi/GridTcpSpiForwardingSelfTest.java index 0350995..a844fbc 100644 --- a/modules/core/src/test/java/org/gridgain/grid/spi/GridTcpSpiForwardingSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/spi/GridTcpSpiForwardingSelfTest.java @@ -94,7 +94,7 @@ public class GridTcpSpiForwardingSelfTest extends GridCommonAbstractTest { cfg.setMarshaller(new IgniteOptimizedMarshaller(false)); TcpCommunicationSpi commSpi = new TcpCommunicationSpi() { - @Override protected GridCommunicationClient createTcpClient(ClusterNode node) throws GridException { + @Override protected GridCommunicationClient createTcpClient(ClusterNode node) throws IgniteCheckedException { Map attrs = new HashMap<>(node.attributes()); attrs.remove(createSpiAttributeName(ATTR_PORT)); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/util/GridSnapshotLockSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/util/GridSnapshotLockSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/GridSnapshotLockSelfTest.java index 54a15d4..7561fbe 100644 --- a/modules/core/src/test/java/org/gridgain/grid/util/GridSnapshotLockSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/util/GridSnapshotLockSelfTest.java @@ -9,8 +9,8 @@ package org.gridgain.grid.util; +import org.apache.ignite.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; import org.gridgain.grid.util.typedef.*; import org.gridgain.testframework.junits.common.*; @@ -39,7 +39,7 @@ public class GridSnapshotLockSelfTest extends GridCommonAbstractTest { final GridSnapshotLock> lock = new GridSnapshotLock>() { @Override protected T3 doSnapshot() { if (rnd.nextBoolean()) - throw new GridRuntimeException(oops); + throw new IgniteException(oops); return new T3<>(x.get(), y.get(), z.get()); } @@ -81,7 +81,7 @@ public class GridSnapshotLockSelfTest extends GridCommonAbstractTest { try { t = lock.snapshot(); } - catch (GridRuntimeException e) { + catch (IgniteException e) { assertEquals(oops, e.getMessage()); continue; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/util/future/GridCompoundFutureSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/util/future/GridCompoundFutureSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/future/GridCompoundFutureSelfTest.java index 6ae318f..7ed0296 100644 --- a/modules/core/src/test/java/org/gridgain/grid/util/future/GridCompoundFutureSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/util/future/GridCompoundFutureSelfTest.java @@ -9,8 +9,8 @@ package org.gridgain.grid.util.future; +import org.apache.ignite.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; import org.gridgain.grid.util.typedef.internal.*; import org.gridgain.testframework.junits.*; import org.gridgain.testframework.junits.common.*; @@ -109,7 +109,7 @@ public class GridCompoundFutureSelfTest extends GridCommonAbstractTest { assertFalse(fut.isDone()); } - futs.get(3).onDone(new GridException("Test message")); + futs.get(3).onDone(new IgniteCheckedException("Test message")); assertTrue(fut.isDone()); } @@ -184,7 +184,7 @@ public class GridCompoundFutureSelfTest extends GridCommonAbstractTest { else if (op == 8) part.onDone(false); else - part.onDone(new GridException("TestMessage")); + part.onDone(new IgniteCheckedException("TestMessage")); } } }, 20); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/util/future/GridEmbeddedFutureSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/util/future/GridEmbeddedFutureSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/future/GridEmbeddedFutureSelfTest.java index 3e35fd3..c3ade47 100644 --- a/modules/core/src/test/java/org/gridgain/grid/util/future/GridEmbeddedFutureSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/util/future/GridEmbeddedFutureSelfTest.java @@ -9,8 +9,8 @@ package org.gridgain.grid.util.future; +import org.apache.ignite.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; import org.gridgain.grid.util.typedef.*; import org.gridgain.testframework.junits.*; import org.gridgain.testframework.junits.common.*; @@ -114,7 +114,7 @@ public class GridEmbeddedFutureSelfTest extends GridCommonAbstractTest { catch (IgniteFutureTimeoutException e) { fail("Failed with timeout exception: " + e); } - catch (GridException e) { + catch (IgniteCheckedException e) { info("Failed with unhandled exception (normal behaviour): " + e); assertSame(x, e.getCause(x.getClass())); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/util/future/GridFinishedFutureSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/util/future/GridFinishedFutureSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/future/GridFinishedFutureSelfTest.java index ad46c0a..9a009de 100644 --- a/modules/core/src/test/java/org/gridgain/grid/util/future/GridFinishedFutureSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/util/future/GridFinishedFutureSelfTest.java @@ -9,10 +9,10 @@ package org.gridgain.grid.util.future; +import org.apache.ignite.*; import org.apache.ignite.lang.*; import org.apache.ignite.marshaller.*; import org.apache.ignite.marshaller.optimized.*; -import org.gridgain.grid.*; import org.gridgain.grid.kernal.*; import org.gridgain.grid.util.typedef.*; import org.gridgain.testframework.*; @@ -39,7 +39,7 @@ public class GridFinishedFutureSelfTest extends GridCommonAbstractTest { */ public void testExternalizable() throws Exception { Object t = "result"; - Throwable ex = new GridRuntimeException("exception"); + Throwable ex = new IgniteException("exception"); testExternalizable(t, null, true); testExternalizable(t, null, false); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureAdapterSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureAdapterSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureAdapterSelfTest.java index 678a0a6..d93f098 100644 --- a/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureAdapterSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureAdapterSelfTest.java @@ -9,12 +9,12 @@ package org.gridgain.grid.util.future; +import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; import org.gridgain.grid.kernal.processors.closure.*; -import org.gridgain.grid.util.typedef.*; import org.gridgain.grid.util.io.*; +import org.gridgain.grid.util.typedef.*; import org.gridgain.testframework.*; import org.gridgain.testframework.junits.*; import org.gridgain.testframework.junits.common.*; @@ -45,7 +45,7 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest { fut = new GridFutureAdapter<>(); - fut.onDone(new GridException("TestMessage")); + fut.onDone(new IgniteCheckedException("TestMessage")); final GridFutureAdapter callFut1 = fut; @@ -53,11 +53,11 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest { @Override public Object call() throws Exception { return callFut1.get(); } - }, GridException.class, "TestMessage"); + }, IgniteCheckedException.class, "TestMessage"); fut = new GridFutureAdapter<>(); - fut.onDone("test", new GridException("TestMessage")); + fut.onDone("test", new IgniteCheckedException("TestMessage")); final GridFutureAdapter callFut2 = fut; @@ -65,7 +65,7 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest { @Override public Object call() throws Exception { return callFut2.get(); } - }, GridException.class, "TestMessage"); + }, IgniteCheckedException.class, "TestMessage"); fut = new GridFutureAdapter<>(); @@ -228,7 +228,7 @@ public class GridFutureAdapterSelfTest extends GridCommonAbstractTest { @SuppressWarnings("ErrorNotRethrown") public void testChaining() throws Exception { final CX1, Object> passThrough = new CX1, Object>() { - @Override public Object applyx(IgniteFuture f) throws GridException { + @Override public Object applyx(IgniteFuture f) throws IgniteCheckedException { return f.get(); } }; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureListenPerformanceTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureListenPerformanceTest.java b/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureListenPerformanceTest.java index 8d7f005..f97de41 100644 --- a/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureListenPerformanceTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/util/future/GridFutureListenPerformanceTest.java @@ -9,8 +9,8 @@ package org.gridgain.grid.util.future; +import org.apache.ignite.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; import org.jdk8.backport.*; import java.util.*; @@ -71,7 +71,7 @@ public class GridFutureListenPerformanceTest { try { t.get(); } - catch (GridException e) { + catch (IgniteCheckedException e) { e.printStackTrace(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/util/future/nio/GridNioFutureSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/util/future/nio/GridNioFutureSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/future/nio/GridNioFutureSelfTest.java index 915419b..d5e9e5d 100644 --- a/modules/core/src/test/java/org/gridgain/grid/util/future/nio/GridNioFutureSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/util/future/nio/GridNioFutureSelfTest.java @@ -9,10 +9,10 @@ package org.gridgain.grid.util.future.nio; +import org.apache.ignite.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; -import org.gridgain.grid.util.typedef.*; import org.gridgain.grid.util.nio.*; +import org.gridgain.grid.util.typedef.*; import org.gridgain.testframework.*; import org.gridgain.testframework.junits.common.*; @@ -42,7 +42,7 @@ public class GridNioFutureSelfTest extends GridCommonAbstractTest { fut = new GridNioFutureImpl<>(); - fut.onDone(new GridException("TestMessage")); + fut.onDone(new IgniteCheckedException("TestMessage")); final GridNioFutureImpl callFut1 = fut; @@ -50,11 +50,11 @@ public class GridNioFutureSelfTest extends GridCommonAbstractTest { @Override public Object call() throws Exception { return callFut1.get(); } - }, GridException.class, "TestMessage"); + }, IgniteCheckedException.class, "TestMessage"); fut = new GridNioFutureImpl<>(); - fut.onDone("test", new GridException("TestMessage")); + fut.onDone("test", new IgniteCheckedException("TestMessage")); final GridNioFuture callFut2 = fut; @@ -62,7 +62,7 @@ public class GridNioFutureSelfTest extends GridCommonAbstractTest { @Override public Object call() throws Exception { return callFut2.get(); } - }, GridException.class, "TestMessage"); + }, IgniteCheckedException.class, "TestMessage"); fut = new GridNioFutureImpl<>(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/util/ipc/GridIpcServerEndpointDeserializerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/util/ipc/GridIpcServerEndpointDeserializerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/ipc/GridIpcServerEndpointDeserializerSelfTest.java index e20c388..7056fe7 100644 --- a/modules/core/src/test/java/org/gridgain/grid/util/ipc/GridIpcServerEndpointDeserializerSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/util/ipc/GridIpcServerEndpointDeserializerSelfTest.java @@ -10,7 +10,7 @@ package org.gridgain.grid.util.ipc; import net.sf.json.*; -import org.gridgain.grid.*; +import org.apache.ignite.*; import org.gridgain.grid.kernal.processors.ggfs.*; import org.gridgain.grid.util.ipc.loopback.*; import org.gridgain.grid.util.ipc.shmem.*; @@ -62,7 +62,7 @@ public class GridIpcServerEndpointDeserializerSelfTest extends GridGgfsCommonAbs return GridIpcServerEndpointDeserializer.deserialize(GridGgfsTestUtils.jsonToMap( JSONSerializer.toJSON(shmemSrvEndpoint).toString())); } - }, GridException.class, "Failed to create server endpoint (type is not specified)"); + }, IgniteCheckedException.class, "Failed to create server endpoint (type is not specified)"); } /** @@ -76,7 +76,7 @@ public class GridIpcServerEndpointDeserializerSelfTest extends GridGgfsCommonAbs return GridIpcServerEndpointDeserializer.deserialize(GridGgfsTestUtils.jsonToMap(json.toString())); } - }, GridException.class, "Failed to create server endpoint (type is unknown): unknownEndpointType"); + }, IgniteCheckedException.class, "Failed to create server endpoint (type is unknown): unknownEndpointType"); } /** @@ -88,7 +88,7 @@ public class GridIpcServerEndpointDeserializerSelfTest extends GridGgfsCommonAbs return GridIpcServerEndpointDeserializer.deserialize(GridGgfsTestUtils.jsonToMap( JSONSerializer.toJSON(tcpSrvEndpoint).toString())); } - }, GridException.class, null); + }, IgniteCheckedException.class, null); } /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridGgfsSharedMemoryTestServer.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridGgfsSharedMemoryTestServer.java b/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridGgfsSharedMemoryTestServer.java index 454080f..d33f92a 100644 --- a/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridGgfsSharedMemoryTestServer.java +++ b/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridGgfsSharedMemoryTestServer.java @@ -9,11 +9,11 @@ package org.gridgain.grid.util.ipc.shmem; -import org.gridgain.grid.*; -import org.gridgain.grid.util.typedef.*; -import org.gridgain.grid.util.typedef.internal.*; +import org.apache.ignite.*; import org.gridgain.grid.util.*; import org.gridgain.grid.util.ipc.*; +import org.gridgain.grid.util.typedef.*; +import org.gridgain.grid.util.typedef.internal.*; import org.gridgain.testframework.junits.*; import java.io.*; @@ -24,7 +24,7 @@ import java.io.*; */ public class GridGgfsSharedMemoryTestServer { @SuppressWarnings({"BusyWait", "InfiniteLoopStatement"}) - public static void main(String[] args) throws GridException { + public static void main(String[] args) throws IgniteCheckedException { System.out.println("Starting server ..."); U.setWorkDirectory(null, U.getGridGainHome()); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryCrashDetectionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryCrashDetectionSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryCrashDetectionSelfTest.java index 87f2bde..8a3b561 100644 --- a/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryCrashDetectionSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemoryCrashDetectionSelfTest.java @@ -10,11 +10,11 @@ package org.gridgain.grid.util.ipc.shmem; import org.apache.commons.collections.*; -import org.gridgain.grid.*; -import org.gridgain.grid.util.typedef.*; -import org.gridgain.grid.util.typedef.internal.*; +import org.apache.ignite.*; import org.gridgain.grid.util.*; import org.gridgain.grid.util.ipc.*; +import org.gridgain.grid.util.typedef.*; +import org.gridgain.grid.util.typedef.internal.*; import org.gridgain.testframework.junits.*; import org.gridgain.testframework.junits.common.*; import org.jetbrains.annotations.*; @@ -229,8 +229,8 @@ public class GridIpcSharedMemoryCrashDetectionSelfTest extends GridCommonAbstrac catch (IOException e) { assertTrue(i >= interactionsCntBeforeSrvKilling); - assertTrue(X.hasCause(e, GridException.class)); - assertTrue(X.cause(e, GridException.class).getMessage().contains("Shared memory segment has been closed")); + assertTrue(X.hasCause(e, IgniteCheckedException.class)); + assertTrue(X.cause(e, IgniteCheckedException.class).getMessage().contains("Shared memory segment has been closed")); } finally { U.closeQuiet(client); @@ -288,8 +288,8 @@ public class GridIpcSharedMemoryCrashDetectionSelfTest extends GridCommonAbstrac assertTrue("No IOException should be thrown before client is killed.", i > interactionsCntBeforeClientKilling); - assertTrue(X.hasCause(e, GridException.class)); - assertTrue(X.cause(e, GridException.class).getMessage().contains("Shared memory segment has been closed")); + assertTrue(X.hasCause(e, IgniteCheckedException.class)); + assertTrue(X.cause(e, IgniteCheckedException.class).getMessage().contains("Shared memory segment has been closed")); clientStartRes.isKilledLatch().await(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemorySpaceSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemorySpaceSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemorySpaceSelfTest.java index dc33cc2..cccf7a5 100644 --- a/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemorySpaceSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/GridIpcSharedMemorySpaceSelfTest.java @@ -241,7 +241,7 @@ public class GridIpcSharedMemorySpaceSelfTest extends GridCommonAbstractTest { assert false; } - catch (GridException e) { + catch (IgniteCheckedException e) { info("Caught expected exception: " + e); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/benchmark/GridIpcSharedMemoryBenchmarkReader.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/benchmark/GridIpcSharedMemoryBenchmarkReader.java b/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/benchmark/GridIpcSharedMemoryBenchmarkReader.java index fd6692e..6e5d9b5 100644 --- a/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/benchmark/GridIpcSharedMemoryBenchmarkReader.java +++ b/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/benchmark/GridIpcSharedMemoryBenchmarkReader.java @@ -9,11 +9,11 @@ package org.gridgain.grid.util.ipc.shmem.benchmark; -import org.gridgain.grid.*; -import org.gridgain.grid.util.typedef.*; -import org.gridgain.grid.util.typedef.internal.*; +import org.apache.ignite.*; import org.gridgain.grid.util.ipc.*; import org.gridgain.grid.util.ipc.shmem.*; +import org.gridgain.grid.util.typedef.*; +import org.gridgain.grid.util.typedef.internal.*; import org.gridgain.testframework.junits.*; import javax.swing.*; @@ -32,9 +32,9 @@ public class GridIpcSharedMemoryBenchmarkReader implements GridIpcSharedMemoryBe /** * @param args Args. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ - public static void main(String[] args) throws GridException { + public static void main(String[] args) throws IgniteCheckedException { GridIpcSharedMemoryNativeLoader.load(); int nThreads = (args.length > 0 ? Integer.parseInt(args[0]) : 1); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/benchmark/GridIpcSharedMemoryBenchmarkWriter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/benchmark/GridIpcSharedMemoryBenchmarkWriter.java b/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/benchmark/GridIpcSharedMemoryBenchmarkWriter.java index a2c9fea..d4715cb 100644 --- a/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/benchmark/GridIpcSharedMemoryBenchmarkWriter.java +++ b/modules/core/src/test/java/org/gridgain/grid/util/ipc/shmem/benchmark/GridIpcSharedMemoryBenchmarkWriter.java @@ -9,11 +9,11 @@ package org.gridgain.grid.util.ipc.shmem.benchmark; +import org.apache.ignite.*; import org.apache.ignite.logger.java.*; -import org.gridgain.grid.*; -import org.gridgain.grid.util.typedef.*; import org.gridgain.grid.util.ipc.*; import org.gridgain.grid.util.ipc.shmem.*; +import org.gridgain.grid.util.typedef.*; import javax.swing.*; import java.io.*; @@ -31,9 +31,9 @@ public class GridIpcSharedMemoryBenchmarkWriter implements GridIpcSharedMemoryBe /** * @param args Args. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ - public static void main(String[] args) throws GridException { + public static void main(String[] args) throws IgniteCheckedException { GridIpcSharedMemoryNativeLoader.load(); int nThreads = args.length > 0 ? Integer.parseInt(args[0]) : 1; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/util/nio/GridNioSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/util/nio/GridNioSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/util/nio/GridNioSelfTest.java index 57e6864..14ee90d 100644 --- a/modules/core/src/test/java/org/gridgain/grid/util/nio/GridNioSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/util/nio/GridNioSelfTest.java @@ -8,12 +8,12 @@ */ package org.gridgain.grid.util.nio; +import org.apache.ignite.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; import org.gridgain.grid.util.*; +import org.gridgain.grid.util.tostring.*; import org.gridgain.grid.util.typedef.*; import org.gridgain.grid.util.typedef.internal.*; -import org.gridgain.grid.util.tostring.*; import org.gridgain.testframework.junits.common.*; import org.jetbrains.annotations.*; @@ -642,7 +642,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest { if (!Arrays.equals(data, res)) { info("Invalid response received."); - err.compareAndSet(null, new GridException("Invalid response received.")); + err.compareAndSet(null, new IgniteCheckedException("Invalid response received.")); barrier.reset(); @@ -650,7 +650,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest { } } } - catch (GridException e) { + catch (IgniteCheckedException e) { info("Encountered unexpected exception: " + e); err.compareAndSet(null, e); @@ -987,17 +987,17 @@ public class GridNioSelfTest extends GridCommonAbstractTest { * @param port Port to connect to. * @param locHost Local host. * @return Created client. - * @throws GridException If client cannot be created. + * @throws IgniteCheckedException If client cannot be created. */ - protected TestClient createClient(InetAddress addr, int port, InetAddress locHost) throws GridException { + protected TestClient createClient(InetAddress addr, int port, InetAddress locHost) throws IgniteCheckedException { return new TestClient(createSocket(), addr, port, 0); } /** * @return Created socket. - * @throws GridException If socket creation failed. + * @throws IgniteCheckedException If socket creation failed. */ - protected Socket createSocket() throws GridException { + protected Socket createSocket() throws IgniteCheckedException { return new Socket(); } @@ -1103,9 +1103,9 @@ public class GridNioSelfTest extends GridCommonAbstractTest { * * @param msg Message to serialize. * @return Serialized message. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ - private byte[] serializeMessage(T msg) throws GridException { + private byte[] serializeMessage(T msg) throws IgniteCheckedException { return getTestResources().getMarshaller().marshal(msg); } @@ -1115,10 +1115,10 @@ public class GridNioSelfTest extends GridCommonAbstractTest { * @param data Serialized data. * @param Message type. * @return Deserialized message. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ @SuppressWarnings({"RedundantTypeArguments"}) - private T deserializeMessage(byte[] data) throws GridException { + private T deserializeMessage(byte[] data) throws IgniteCheckedException { return getTestResources().getMarshaller().unmarshal(data, getClass().getClassLoader()); } @@ -1290,9 +1290,9 @@ public class GridNioSelfTest extends GridCommonAbstractTest { * @param addr Address to connect to. * @param port Port to connect to. * @param connTimeout Connection timeout. - * @throws GridException If connect failed. + * @throws IgniteCheckedException If connect failed. */ - private TestClient(Socket sock, InetAddress addr, int port, int connTimeout) throws GridException { + private TestClient(Socket sock, InetAddress addr, int port, int connTimeout) throws IgniteCheckedException { this.sock = sock; try { @@ -1308,7 +1308,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest { catch (IOException e) { close(); - throw new GridException(e); + throw new IgniteCheckedException(e); } } @@ -1424,7 +1424,7 @@ public class GridNioSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ - @Override public ByteBuffer encode(GridNioSession ses, Object msg) throws IOException, GridException { + @Override public ByteBuffer encode(GridNioSession ses, Object msg) throws IOException, IgniteCheckedException { // IO manager creates array ready to send. return msg instanceof byte[] ? ByteBuffer.wrap((byte[])msg) : (ByteBuffer)msg; }