http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java index 59497a4..517d36a 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsAbstractSelfTest.java @@ -296,7 +296,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes try { paths = ggfs.listFiles(SUBDIR); } - catch (GridException ignore) { + catch (IgniteCheckedException ignore) { // No-op. } @@ -329,7 +329,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes try { info = ggfs.info(DIR); } - catch (GridException ignore) { + catch (IgniteCheckedException ignore) { // No-op. } @@ -686,7 +686,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes return null; } - }, GridException.class, "Failed to delete the path due to secondary file system exception:"); + }, IgniteCheckedException.class, "Failed to delete the path due to secondary file system exception:"); else { GridTestUtils.assertThrows(log, new Callable<Object>() { @Override public Object call() throws Exception { @@ -1083,7 +1083,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes checkFileContent(ggfs, path, chunk); } - catch (IOException | GridException e) { + catch (IOException | IgniteCheckedException e) { err.compareAndSet(null, e); // Log the very first error. } } @@ -1124,7 +1124,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes createCtr.incrementAndGet(); } - catch (GridException ignore) { + catch (IgniteCheckedException ignore) { try { U.sleep(10); } @@ -1217,7 +1217,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes return null; } - }, GridException.class, null); + }, IgniteCheckedException.class, null); } /** @@ -1402,7 +1402,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes checkFileContent(ggfs, path, chunks); } - catch (IOException | GridException e) { + catch (IOException | IgniteCheckedException e) { err.compareAndSet(null, e); // Log the very first error. } } @@ -1443,7 +1443,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes chunksCtr.incrementAndGet(); } - catch (GridException ignore) { + catch (IgniteCheckedException ignore) { try { U.sleep(10); } @@ -1518,7 +1518,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes try { ggfs.mkdirs(SUBSUBDIR); } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { return false; } @@ -1533,7 +1533,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes try { return ggfs.delete(DIR, true); } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { return false; } } @@ -1570,7 +1570,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes return true; } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { return false; } } @@ -1583,7 +1583,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes try { return ggfs.delete(SUBDIR, true); } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { return false; } } @@ -1634,7 +1634,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes return true; } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { return false; } } @@ -1647,7 +1647,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes try { return ggfs.delete(SUBDIR_NEW, true); } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { return false; } } @@ -1690,7 +1690,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes return true; } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { return false; } } @@ -1705,7 +1705,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes return true; } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { return false; } } @@ -1750,7 +1750,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes return true; } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { return false; } } @@ -1765,7 +1765,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes return true; } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { return false; } } @@ -1978,7 +1978,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes ggfs.rename(fromPath, toPath); } - catch (GridException ignore) { + catch (IgniteCheckedException ignore) { // No-op. } } @@ -2002,7 +2002,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes ggfs.delete(path, true); } - catch (GridException ignore) { + catch (IgniteCheckedException ignore) { // No-op. } } @@ -2026,7 +2026,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes ggfs.update(path, properties("owner", "group", null)); } - catch (GridException ignore) { + catch (IgniteCheckedException ignore) { // No-op. } } @@ -2053,7 +2053,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes ggfs.mkdirs(path); } - catch (GridException ignore) { + catch (IgniteCheckedException ignore) { // No-op. } } @@ -2088,7 +2088,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes U.closeQuiet(os); } } - catch (IOException | GridException ignore) { + catch (IOException | IgniteCheckedException ignore) { // No-op. } } @@ -2148,10 +2148,10 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes * @param overwrite Overwrite flag. * @param chunks Data chunks. * @throws IOException In case of IO exception. - * @throws GridException In case of Grid exception. + * @throws IgniteCheckedException In case of Grid exception. */ protected static void createFile(IgniteFsFileSystem ggfs, IgniteFsPath file, boolean overwrite, - @Nullable byte[]... chunks) throws IOException, GridException { + @Nullable byte[]... chunks) throws IOException, IgniteCheckedException { OutputStream os = null; try { @@ -2240,7 +2240,7 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes try { ggfs.update(file, Collections.singletonMap("prop", "val")); } - catch (GridException ignore) { + catch (IgniteCheckedException ignore) { // No-op. } } @@ -2265,9 +2265,9 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes * * @param ggfs GGFS. * @param paths Paths. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ - protected void checkExist(GridGgfsImpl ggfs, IgniteFsPath... paths) throws GridException { + protected void checkExist(GridGgfsImpl ggfs, IgniteFsPath... paths) throws IgniteCheckedException { for (IgniteFsPath path : paths) { assert ggfs.context().meta().fileId(path) != null : "Path doesn't exist [ggfs=" + ggfs.name() + ", path=" + path + ']'; @@ -2334,10 +2334,10 @@ public abstract class GridGgfsAbstractSelfTest extends GridGgfsCommonAbstractTes * @param file File. * @param chunks Expected data. * @throws IOException In case of IO exception. - * @throws GridException In case of Grid exception. + * @throws IgniteCheckedException In case of Grid exception. */ protected void checkFileContent(GridGgfsImpl ggfs, IgniteFsPath file, @Nullable byte[]... chunks) - throws IOException, GridException { + throws IOException, IgniteCheckedException { if (chunks != null && chunks.length > 0) { IgniteFsInputStream is = null;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDualAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDualAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDualAbstractSelfTest.java index 8873f48..9758af7 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDualAbstractSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsDualAbstractSelfTest.java @@ -9,14 +9,14 @@ package org.gridgain.grid.kernal.processors.ggfs; +import org.apache.ignite.*; import org.apache.ignite.fs.*; -import org.gridgain.grid.*; -import org.gridgain.grid.cache.GridCache; -import org.gridgain.grid.util.typedef.internal.*; +import org.gridgain.grid.cache.*; import org.gridgain.grid.util.lang.*; -import org.gridgain.testframework.GridTestUtils; +import org.gridgain.grid.util.typedef.internal.*; +import org.gridgain.testframework.*; -import java.io.IOException; +import java.io.*; import java.util.*; import java.util.concurrent.*; @@ -1392,7 +1392,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT return true; } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { return false; } } @@ -1448,7 +1448,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT return true; } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { return false; } } @@ -1500,7 +1500,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT return true; } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { return false; } } @@ -1515,7 +1515,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT return true; } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { return false; } } @@ -1560,7 +1560,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT return true; } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { return false; } } @@ -1575,7 +1575,7 @@ public abstract class GridGgfsDualAbstractSelfTest extends GridGgfsAbstractSelfT return true; } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { return false; } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFileInfoSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFileInfoSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFileInfoSelfTest.java index 84cca65..7b79d70 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFileInfoSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFileInfoSelfTest.java @@ -9,9 +9,9 @@ package org.gridgain.grid.kernal.processors.ggfs; +import org.apache.ignite.*; import org.apache.ignite.marshaller.*; import org.apache.ignite.marshaller.optimized.*; -import org.gridgain.grid.*; import org.gridgain.grid.util.typedef.*; import org.jetbrains.annotations.*; @@ -38,7 +38,7 @@ public class GridGgfsFileInfoSelfTest extends GridGgfsCommonAbstractTest { private final Random rnd = new Random(); @SuppressWarnings("deprecation") // Suppress due to default constructor should never be used directly. - @Nullable @Override public Object call() throws GridException { + @Nullable @Override public Object call() throws IgniteCheckedException { for (int i = 0; i < 10000; i++) { testSerialization(new GridGgfsFileInfo()); testSerialization(new GridGgfsFileInfo()); @@ -61,9 +61,9 @@ public class GridGgfsFileInfoSelfTest extends GridGgfsCommonAbstractTest { * Test node info serialization. * * @param info Node info to test serialization for. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ - public void testSerialization(GridGgfsFileInfo info) throws GridException { + public void testSerialization(GridGgfsFileInfo info) throws IgniteCheckedException { assertEquals(info, mu(info)); } @@ -72,9 +72,9 @@ public class GridGgfsFileInfoSelfTest extends GridGgfsCommonAbstractTest { * * @param obj Object to marshal/unmarshal. * @return Marshalled and then unmarshalled object. - * @throws GridException In case of any marshalling exception. + * @throws IgniteCheckedException In case of any marshalling exception. */ - private <T> T mu(T obj) throws GridException { + private <T> T mu(T obj) throws IgniteCheckedException { return marshaller.unmarshal(marshaller.marshal(obj), null); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModesSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModesSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModesSelfTest.java index 0fe5df6..dfa5425 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModesSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsModesSelfTest.java @@ -9,23 +9,23 @@ package org.gridgain.grid.kernal.processors.ggfs; +import org.apache.ignite.*; import org.apache.ignite.configuration.*; import org.apache.ignite.fs.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; -import org.gridgain.grid.cache.*; -import org.gridgain.grid.kernal.*; import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; +import org.gridgain.grid.cache.*; +import org.gridgain.grid.kernal.*; import org.gridgain.grid.util.typedef.*; import org.gridgain.grid.util.typedef.internal.*; import org.gridgain.testframework.*; import java.util.*; +import static org.apache.ignite.fs.IgniteFsMode.*; import static org.gridgain.grid.cache.GridCacheAtomicityMode.*; import static org.gridgain.grid.cache.GridCacheMode.*; -import static org.apache.ignite.fs.IgniteFsMode.*; /** * GGFS modes self test. @@ -363,7 +363,7 @@ public class GridGgfsModesSelfTest extends GridGgfsCommonAbstractTest { try { startUp(); } - catch (GridException e) { + catch (IgniteCheckedException e) { errMsg = e.getCause().getMessage(); } @@ -429,7 +429,7 @@ public class GridGgfsModesSelfTest extends GridGgfsCommonAbstractTest { try { startUp(); } - catch (GridException e) { + catch (IgniteCheckedException e) { errMsg = e.getCause().getMessage(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorSelfTest.java index c402cad..2707546 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorSelfTest.java @@ -833,7 +833,7 @@ public class GridGgfsProcessorSelfTest extends GridGgfsCommonAbstractTest { * @param overwrite Overwrite file if it already exists. * @param text Text to write into file. * @return Content of this file. - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. */ private String create(String path, boolean overwrite, String text) throws Exception { @@ -853,7 +853,7 @@ public class GridGgfsProcessorSelfTest extends GridGgfsCommonAbstractTest { * @param create Create file if it doesn't exist yet. * @param text Text to append to file. * @return Content of this file. - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. */ private String append(String path, boolean create, String text) throws Exception { @@ -871,7 +871,7 @@ public class GridGgfsProcessorSelfTest extends GridGgfsCommonAbstractTest { * * @param path File path to read. * @return Content of this file. - * @throws GridException In case of error. + * @throws IgniteCheckedException In case of error. */ private String read(String path) throws Exception { @@ -944,7 +944,7 @@ public class GridGgfsProcessorSelfTest extends GridGgfsCommonAbstractTest { return false; } - }, GridException.class, msg); + }, IgniteCheckedException.class, msg); } /** @@ -952,9 +952,9 @@ public class GridGgfsProcessorSelfTest extends GridGgfsCommonAbstractTest { * * @param path Directory path to validate listing for. * @param item List of directory items. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ - private void assertListDir(String path, String... item) throws GridException { + private void assertListDir(String path, String... item) throws IgniteCheckedException { Collection<IgniteFsFile> files = ggfs.listFiles(new IgniteFsPath(path)); List<String> names = new ArrayList<>(item.length); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorValidationSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorValidationSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorValidationSelfTest.java index 9880b37..d32f6ac 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorValidationSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsProcessorValidationSelfTest.java @@ -9,22 +9,22 @@ package org.gridgain.grid.kernal.processors.ggfs; +import org.apache.ignite.*; import org.apache.ignite.configuration.*; import org.apache.ignite.fs.*; -import org.gridgain.grid.*; -import org.gridgain.grid.cache.*; -import org.gridgain.grid.kernal.processors.cache.*; import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; +import org.gridgain.grid.cache.*; +import org.gridgain.grid.kernal.processors.cache.*; import org.gridgain.grid.util.typedef.*; -import java.lang.reflect.Array; +import java.lang.reflect.*; import java.util.*; +import static org.apache.ignite.fs.IgniteFsMode.*; import static org.gridgain.grid.cache.GridCacheAtomicityMode.*; import static org.gridgain.grid.cache.GridCacheMode.*; -import static org.apache.ignite.fs.IgniteFsMode.*; /** * Tests for node validation logic in {@link GridGgfsProcessor}. @@ -443,7 +443,7 @@ public class GridGgfsProcessorValidationSelfTest extends GridGgfsCommonAbstractT } /** - * Checks that the given grid configuration will lead to {@link GridException} upon grid startup. + * Checks that the given grid configuration will lead to {@link IgniteCheckedException} upon grid startup. * * @param cfg Grid configuration to check. * @param excMsgSnippet Root cause (assertion) exception message snippet. @@ -458,7 +458,7 @@ public class GridGgfsProcessorValidationSelfTest extends GridGgfsCommonAbstractT fail("No exception has been thrown."); } - catch (GridException e) { + catch (IgniteCheckedException e) { if (testLoc) { if ("Failed to start processor: GridProcessorAdapter []".equals(e.getMessage()) && e.getCause().getMessage().contains(excMsgSnippet)) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java index 57bb6a0..ec24c2f 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java @@ -9,15 +9,15 @@ package org.gridgain.grid.kernal.processors.ggfs; +import org.apache.ignite.*; import org.apache.ignite.configuration.*; import org.apache.ignite.fs.*; -import org.gridgain.grid.*; -import org.gridgain.grid.cache.*; -import org.gridgain.grid.kernal.*; -import org.gridgain.grid.kernal.processors.port.*; import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; +import org.gridgain.grid.cache.*; +import org.gridgain.grid.kernal.*; +import org.gridgain.grid.kernal.processors.port.*; import org.gridgain.grid.util.ipc.loopback.*; import org.gridgain.grid.util.ipc.shmem.*; import org.gridgain.grid.util.typedef.*; @@ -28,8 +28,8 @@ import org.jetbrains.annotations.*; import java.util.*; import java.util.concurrent.atomic.*; -import static org.gridgain.grid.cache.GridCacheAtomicityMode.*; import static org.apache.ignite.fs.IgniteFsConfiguration.*; +import static org.gridgain.grid.cache.GridCacheAtomicityMode.*; /** * Base test class for {@link GridGgfsServer} checking IPC endpoint registrations. @@ -146,7 +146,7 @@ public abstract class GridGgfsServerManagerIpcEndpointRegistrationAbstractSelfTe * @param endpointCfg Optional REST endpoint configuration. * @return test-purposed IgniteFsConfiguration. */ - protected IgniteFsConfiguration gridGgfsConfiguration(@Nullable String endpointCfg) throws GridException { + protected IgniteFsConfiguration gridGgfsConfiguration(@Nullable String endpointCfg) throws IgniteCheckedException { IgniteFsConfiguration ggfsConfiguration = new IgniteFsConfiguration(); ggfsConfiguration.setDataCacheName("partitioned"); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java index aef13c5..7643502 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java @@ -9,11 +9,11 @@ package org.gridgain.grid.kernal.processors.ggfs; +import org.apache.ignite.*; import org.apache.ignite.configuration.*; -import org.gridgain.grid.*; -import org.gridgain.grid.util.typedef.*; import org.gridgain.grid.util.ipc.loopback.*; import org.gridgain.grid.util.ipc.shmem.*; +import org.gridgain.grid.util.typedef.*; import java.util.concurrent.*; @@ -38,7 +38,7 @@ public class GridGgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest return G.start(cfg); } - }, GridException.class, null); + }, IgniteCheckedException.class, null); assert e.getCause().getMessage().contains(" should not be configured on Windows (configure " + GridIpcServerTcpEndpoint.class.getSimpleName() + ")"); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsStreamsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsStreamsSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsStreamsSelfTest.java index c7cb467..3a922c7 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsStreamsSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsStreamsSelfTest.java @@ -142,9 +142,9 @@ public class GridGgfsStreamsSelfTest extends GridGgfsCommonAbstractTest { /** * Test GGFS construction. * - * @throws GridException In case of exception. + * @throws IgniteCheckedException In case of exception. */ - public void testConfiguration() throws GridException { + public void testConfiguration() throws IgniteCheckedException { GridCache metaCache = getFieldValue(fs, "meta", "metaCache"); GridCache dataCache = getFieldValue(fs, "data", "dataCache"); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskSelfTest.java index 729fddd..68ac49f 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsTaskSelfTest.java @@ -231,12 +231,12 @@ public class GridGgfsTaskSelfTest extends GridGgfsCommonAbstractTest { private static class Task extends IgniteFsTask<String, IgniteBiTuple<Long, Integer>> { /** {@inheritDoc} */ @Override public IgniteFsJob createJob(IgniteFsPath path, IgniteFsFileRange range, - IgniteFsTaskArgs<String> args) throws GridException { + IgniteFsTaskArgs<String> args) throws IgniteCheckedException { return new Job(); } /** {@inheritDoc} */ - @Override public IgniteBiTuple<Long, Integer> reduce(List<ComputeJobResult> ress) throws GridException { + @Override public IgniteBiTuple<Long, Integer> reduce(List<ComputeJobResult> ress) throws IgniteCheckedException { long totalLen = 0; int argCnt = 0; @@ -268,7 +268,7 @@ public class GridGgfsTaskSelfTest extends GridGgfsCommonAbstractTest { /** {@inheritDoc} */ @Override public Object execute(IgniteFs ggfs, IgniteFsFileRange range, IgniteFsInputStream in) - throws GridException, IOException { + throws IgniteCheckedException, IOException { assert ignite != null; assert ses != null; assert ctx != null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java index a339499..cafff4e 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheCommandHandlerSelfTest.java @@ -9,19 +9,19 @@ package org.gridgain.grid.kernal.processors.rest.handlers.cache; +import org.apache.ignite.*; import org.apache.ignite.configuration.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; +import org.apache.ignite.spi.discovery.tcp.*; +import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; import org.gridgain.grid.cache.*; import org.gridgain.grid.kernal.*; import org.gridgain.grid.kernal.processors.cache.*; import org.gridgain.grid.kernal.processors.rest.*; import org.gridgain.grid.kernal.processors.rest.handlers.*; import org.gridgain.grid.kernal.processors.rest.request.*; -import org.apache.ignite.spi.discovery.tcp.*; -import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; -import org.gridgain.grid.util.typedef.*; import org.gridgain.grid.util.future.*; +import org.gridgain.grid.util.typedef.*; import org.gridgain.testframework.junits.common.*; import java.lang.reflect.*; @@ -82,7 +82,7 @@ public class GridCacheCommandHandlerSelfTest extends GridCommonAbstractTest { fail("Expected exception not thrown."); } - catch (GridException e) { + catch (IgniteCheckedException e) { info("Got expected exception: " + e); } } @@ -107,7 +107,7 @@ public class GridCacheCommandHandlerSelfTest extends GridCommonAbstractTest { fail("Expected exception not thrown."); } - catch (GridException e) { + catch (IgniteCheckedException e) { info("Got expected exception: " + e); } } @@ -150,7 +150,7 @@ public class GridCacheCommandHandlerSelfTest extends GridCommonAbstractTest { fail("Expects failed with incompatible types message."); } - catch (GridException e) { + catch (IgniteCheckedException e) { info("Got expected exception: " + e); assertTrue(e.getMessage().startsWith("Incompatible types")); @@ -165,9 +165,9 @@ public class GridCacheCommandHandlerSelfTest extends GridCommonAbstractTest { * @param append Append or prepend flag. * @param <T> Cache value type. * @return Resulting value in cache. - * @throws GridException In case of any grid exception. + * @throws IgniteCheckedException In case of any grid exception. */ - private <T> T testAppend(T curVal, T newVal, boolean append) throws GridException { + private <T> T testAppend(T curVal, T newVal, boolean append) throws IgniteCheckedException { GridRestCommandHandler hnd = new GridCacheCommandHandler(((GridKernal)grid()).context()); String key = UUID.randomUUID().toString(); @@ -226,7 +226,7 @@ public class GridCacheCommandHandlerSelfTest extends GridCommonAbstractTest { * * @return Instance of a GridCache proxy. */ - @Override protected GridCacheProjectionEx<Object, Object> localCache(String cacheName) throws GridException { + @Override protected GridCacheProjectionEx<Object, Object> localCache(String cacheName) throws IgniteCheckedException { final GridCacheProjectionEx<Object, Object> cache = super.localCache(cacheName); return (GridCacheProjectionEx<Object, Object>)Proxy.newProxyInstance(getClass().getClassLoader(), @@ -235,7 +235,7 @@ public class GridCacheCommandHandlerSelfTest extends GridCommonAbstractTest { @Override public Object invoke(Object proxy, Method mtd, Object[] args) throws Throwable { if (failMtd.equals(mtd.getName())) { IgniteFuture<Object> fut = new GridFinishedFuture<>(ctx, - new GridException("Operation failed")); + new IgniteCheckedException("Operation failed")); fut.syncNotify(sync); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorAbstractSelfTest.java index 2659c04..835bb26 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorAbstractSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorAbstractSelfTest.java @@ -185,7 +185,7 @@ public abstract class GridServiceProcessorAbstractSelfTest extends GridCommonAbs fail("Failed to receive mismatching configuration exception."); } - catch (GridException e) { + catch (IgniteCheckedException e) { info("Received mismatching configuration exception: " + e.getMessage()); } } @@ -599,7 +599,7 @@ public abstract class GridServiceProcessorAbstractSelfTest extends GridCommonAbs } catch (Exception e) { - throw new GridRuntimeException(e); + throw new IgniteException(e); } } @@ -611,7 +611,7 @@ public abstract class GridServiceProcessorAbstractSelfTest extends GridCommonAbs return val == null ? 0 : val.get(); } catch (Exception e) { - throw new GridRuntimeException(e); + throw new IgniteException(e); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorSingleNodeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorSingleNodeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorSingleNodeSelfTest.java index dcc64d7..37c056f 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorSingleNodeSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessorSingleNodeSelfTest.java @@ -43,7 +43,7 @@ public class GridServiceProcessorSingleNodeSelfTest extends GridServiceProcessor fail("Should never reach here."); } - catch (GridRuntimeException e) { + catch (IgniteException e) { info("Got expected exception: " + e.getMessage()); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceReassignmentSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceReassignmentSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceReassignmentSelfTest.java index e27d349..9e1f2e9 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceReassignmentSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/service/GridServiceReassignmentSelfTest.java @@ -66,7 +66,7 @@ public class GridServiceReassignmentSelfTest extends GridServiceProcessorAbstrac /** * @param total Total number of services. * @param maxPerNode Maximum number of services per node. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ private void checkReassigns(int total, int maxPerNode) throws Exception { CountDownLatch latch = new CountDownLatch(nodeCount()); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerEvictionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerEvictionSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerEvictionSelfTest.java index e18273f..ce2188c 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerEvictionSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerEvictionSelfTest.java @@ -9,14 +9,14 @@ package org.gridgain.grid.kernal.processors.streamer; +import org.apache.ignite.*; import org.apache.ignite.configuration.*; import org.apache.ignite.marshaller.optimized.*; -import org.apache.ignite.streamer.*; -import org.apache.ignite.streamer.window.*; -import org.gridgain.grid.*; import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; +import org.apache.ignite.streamer.*; +import org.apache.ignite.streamer.window.*; import org.gridgain.grid.util.typedef.*; import org.gridgain.testframework.junits.common.*; @@ -91,7 +91,7 @@ public class GridStreamerEvictionSelfTest extends GridCommonAbstractTest { SC stage = new SC() { @SuppressWarnings("unchecked") @Override public Map<String, Collection<?>> applyx(String stageName, StreamerContext ctx, - Collection<Object> evts) throws GridException { + Collection<Object> evts) throws IgniteCheckedException { assert evts.size() == 1; if (ctx.nextStageName() == null) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerSelfTest.java index be8c3e9..11bcf55 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerSelfTest.java @@ -157,7 +157,7 @@ public class GridStreamerSelfTest extends GridCommonAbstractTest { @SuppressWarnings("unchecked") @Override public Map<String, Collection<?>> applyx(String stageName, StreamerContext ctx, Collection<Object> evts) - throws GridException { + throws IgniteCheckedException { String nextStage = ctx.nextStageName(); U.sleep(50); @@ -261,7 +261,7 @@ public class GridStreamerSelfTest extends GridCommonAbstractTest { p2pEnabled = false; final CountDownLatch finishLatch = new CountDownLatch(1); - final AtomicReference<GridException> err = new AtomicReference<>(); + final AtomicReference<IgniteCheckedException> err = new AtomicReference<>(); SC stage = new SC() { @SuppressWarnings("unchecked") @@ -282,7 +282,7 @@ public class GridStreamerSelfTest extends GridCommonAbstractTest { val++; if (!String.valueOf(val).equals(ctx.nextStageName())) - err.compareAndSet(null, new GridException("Stage name comparison failed [exp=" + val + + err.compareAndSet(null, new IgniteCheckedException("Stage name comparison failed [exp=" + val + ", actual=" + ctx.nextStageName() + ']')); return (Map)F.asMap(ctx.nextStageName(), F.asList(val)); @@ -450,7 +450,7 @@ public class GridStreamerSelfTest extends GridCommonAbstractTest { SC stage = new SC() { @SuppressWarnings("unchecked") @Override public Map<String, Collection<?>> applyx(String stageName, StreamerContext ctx, - Collection<Object> evts) throws GridException { + Collection<Object> evts) throws IgniteCheckedException { String nextStage = ctx.nextStageName(); ctx.window().enqueueAll(evts); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridTestStage.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridTestStage.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridTestStage.java index cb35b47..456db60 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridTestStage.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/streamer/GridTestStage.java @@ -9,8 +9,8 @@ package org.gridgain.grid.kernal.processors.streamer; +import org.apache.ignite.*; import org.apache.ignite.streamer.*; -import org.gridgain.grid.*; import java.util.*; @@ -40,7 +40,7 @@ class GridTestStage implements StreamerStage<Object> { /** {@inheritDoc} */ @Override public Map<String, Collection<?>> run(StreamerContext ctx, Collection<Object> evts) - throws GridException { + throws IgniteCheckedException { return stageClos.apply(name(), ctx, evts); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/lang/GridFuncSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/lang/GridFuncSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/lang/GridFuncSelfTest.java index 832068e..a285ef7 100644 --- a/modules/core/src/test/java/org/gridgain/grid/lang/GridFuncSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/lang/GridFuncSelfTest.java @@ -1193,7 +1193,7 @@ public class GridFuncSelfTest extends GridCommonAbstractTest { assert false; } - catch (GridRuntimeException e) { + catch (IgniteException e) { info("Caught expected exception: " + e); } } @@ -3037,7 +3037,7 @@ public class GridFuncSelfTest extends GridCommonAbstractTest { try { F.eventNode(null, null); } - catch (GridRuntimeException e) { + catch (IgniteException 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/lang/GridFutureListenPerformanceTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/lang/GridFutureListenPerformanceTest.java b/modules/core/src/test/java/org/gridgain/grid/lang/GridFutureListenPerformanceTest.java index 58b15ed..871a25a 100644 --- a/modules/core/src/test/java/org/gridgain/grid/lang/GridFutureListenPerformanceTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/lang/GridFutureListenPerformanceTest.java @@ -9,8 +9,8 @@ package org.gridgain.grid.lang; +import org.apache.ignite.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; import org.gridgain.grid.util.future.*; import org.jdk8.backport.*; @@ -72,7 +72,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/lang/GridXSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/lang/GridXSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/lang/GridXSelfTest.java index b64cbe4..1a57e3b 100644 --- a/modules/core/src/test/java/org/gridgain/grid/lang/GridXSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/lang/GridXSelfTest.java @@ -9,7 +9,7 @@ package org.gridgain.grid.lang; -import org.gridgain.grid.*; +import org.apache.ignite.*; import org.gridgain.grid.util.typedef.*; import org.gridgain.testframework.junits.common.*; @@ -30,7 +30,7 @@ public class GridXSelfTest extends GridCommonAbstractTest { IOException ioEx = new IOException(conEx); - GridException gridEx = new GridException(ioEx); + IgniteCheckedException gridEx = new IgniteCheckedException(ioEx); assert X.hasCause(gridEx, IOException.class, NumberFormatException.class); assert !X.hasCause(gridEx, NumberFormatException.class); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/loadtest/GridSingleExecutionTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/loadtest/GridSingleExecutionTest.java b/modules/core/src/test/java/org/gridgain/grid/loadtest/GridSingleExecutionTest.java index 637ec1b..4ab1cd4 100644 --- a/modules/core/src/test/java/org/gridgain/grid/loadtest/GridSingleExecutionTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/loadtest/GridSingleExecutionTest.java @@ -103,9 +103,9 @@ public final class GridSingleExecutionTest { * * @param log Log file name. * @return Logger. - * @throws GridException If file initialization failed. + * @throws IgniteCheckedException If file initialization failed. */ - private static IgniteLogger initLogger(String log) throws GridException { + private static IgniteLogger initLogger(String log) throws IgniteCheckedException { Logger impl = Logger.getRootLogger(); @@ -126,7 +126,7 @@ public final class GridSingleExecutionTest { fileApp.rollOver(); } catch (IOException e) { - throw new GridException("Unable to initialize file appender.", e); + throw new IgniteCheckedException("Unable to initialize file appender.", e); } LevelRangeFilter lvlFilter = new LevelRangeFilter(); @@ -169,19 +169,19 @@ public final class GridSingleExecutionTest { * @param springCfgPath Configuration file path. * @param log Log file name. * @return List of configurations. - * @throws GridException If failed.. + * @throws IgniteCheckedException If failed.. */ @SuppressWarnings("unchecked") - private static Iterable<IgniteConfiguration> getConfigurations(String springCfgPath, String log) throws GridException { + private static Iterable<IgniteConfiguration> getConfigurations(String springCfgPath, String log) throws IgniteCheckedException { File path = GridTestUtils.resolveGridGainPath(springCfgPath); if (path == null) { - throw new GridException("Spring XML configuration file path is invalid: " + new File(springCfgPath) + + throw new IgniteCheckedException("Spring XML configuration file path is invalid: " + new File(springCfgPath) + ". Note that this path should be either absolute path or a relative path to GRIDGAIN_HOME."); } if (!path.isFile()) - throw new GridException("Provided file path is not a file: " + path); + throw new IgniteCheckedException("Provided file path is not a file: " + path); // Add no-op logger to remove no-appender warning. Appender app = new NullAppender(); @@ -194,7 +194,7 @@ public final class GridSingleExecutionTest { springCtx = new FileSystemXmlApplicationContext(path.toURI().toURL().toString()); } catch (BeansException | MalformedURLException e) { - throw new GridException("Failed to instantiate Spring XML application context: " + e.getMessage(), e); + throw new IgniteCheckedException("Failed to instantiate Spring XML application context: " + e.getMessage(), e); } Map cfgMap; @@ -204,18 +204,18 @@ public final class GridSingleExecutionTest { cfgMap = springCtx.getBeansOfType(IgniteConfiguration.class); } catch (BeansException e) { - throw new GridException("Failed to instantiate bean [type=" + IgniteConfiguration.class + ", err=" + + throw new IgniteCheckedException("Failed to instantiate bean [type=" + IgniteConfiguration.class + ", err=" + e.getMessage() + ']', e); } if (cfgMap == null) - throw new GridException("Failed to find a single grid factory configuration in: " + path); + throw new IgniteCheckedException("Failed to find a single grid factory configuration in: " + path); // Remove previously added no-op logger. Logger.getRootLogger().removeAppender(app); if (cfgMap.isEmpty()) - throw new GridException("Can't find grid factory configuration in: " + path); + throw new IgniteCheckedException("Can't find grid factory configuration in: " + path); Collection<IgniteConfiguration> res = new ArrayList<>(); @@ -235,7 +235,7 @@ public final class GridSingleExecutionTest { /** */ public static class TestTask extends ComputeTaskSplitAdapter<Object, Object> { /** {@inheritDoc} */ - @Override protected Collection<? extends ComputeJob> split(int gridSize, Object arg) throws GridException { + @Override protected Collection<? extends ComputeJob> split(int gridSize, Object arg) throws IgniteCheckedException { Collection<ComputeJob> jobs = new ArrayList<>(JOB_COUNT); for (int i = 0; i < JOB_COUNT; i++) { @@ -243,7 +243,7 @@ public final class GridSingleExecutionTest { @IgniteLoggerResource private IgniteLogger log; - @Override public Serializable execute() throws GridException { + @Override public Serializable execute() throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Executing job [index=" + argument(0) + ']'); @@ -256,7 +256,7 @@ public final class GridSingleExecutionTest { } /** {@inheritDoc} */ - @Override public Object reduce(List<ComputeJobResult> results) throws GridException { + @Override public Object reduce(List<ComputeJobResult> results) throws IgniteCheckedException { assert results != null : "Unexpected result [results=" + results + ']'; assert results.size() == JOB_COUNT : "Unexpected result [results=" + results + ']'; @@ -271,7 +271,7 @@ public final class GridSingleExecutionTest { private ComputeTaskSession ses; /** {@inheritDoc} */ - @Override protected Collection<? extends ComputeJob> split(int gridSize, Object arg) throws GridException { + @Override protected Collection<? extends ComputeJob> split(int gridSize, Object arg) throws IgniteCheckedException { Collection<ComputeJob> jobs = new ArrayList<>(JOB_COUNT); for (int i = 0; i < JOB_COUNT; i++) { @@ -279,7 +279,7 @@ public final class GridSingleExecutionTest { @IgniteLoggerResource private IgniteLogger log; - @Override public Serializable execute() throws GridException { + @Override public Serializable execute() throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Executing job [index=" + argument(0) + ']'); @@ -299,7 +299,7 @@ public final class GridSingleExecutionTest { /** {@inheritDoc} */ @Override public ComputeJobResultPolicy result(ComputeJobResult res, - List<ComputeJobResult> received) throws GridException { + List<ComputeJobResult> received) throws IgniteCheckedException { ses.setAttribute("attr7", 7); ses.setAttribute("attr8", 8); @@ -307,7 +307,7 @@ public final class GridSingleExecutionTest { } /** {@inheritDoc} */ - @Override public Object reduce(List<ComputeJobResult> results) throws GridException { + @Override public Object reduce(List<ComputeJobResult> results) throws IgniteCheckedException { assert results != null : "Unexpected result [results=" + results + ']'; assert results.size() == JOB_COUNT : "Unexpected result [results=" + results + ']'; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/loadtest/swapspace/GridFileSwapSpaceSpiMultithreadedLoadTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/loadtest/swapspace/GridFileSwapSpaceSpiMultithreadedLoadTest.java b/modules/core/src/test/java/org/gridgain/grid/loadtest/swapspace/GridFileSwapSpaceSpiMultithreadedLoadTest.java index 4f57454..4f3e036 100644 --- a/modules/core/src/test/java/org/gridgain/grid/loadtest/swapspace/GridFileSwapSpaceSpiMultithreadedLoadTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/loadtest/swapspace/GridFileSwapSpaceSpiMultithreadedLoadTest.java @@ -9,9 +9,9 @@ package org.gridgain.grid.loadtest.swapspace; +import org.apache.ignite.*; import org.apache.ignite.lang.*; import org.apache.ignite.spi.*; -import org.gridgain.grid.*; import org.apache.ignite.spi.swapspace.*; import org.apache.ignite.spi.swapspace.file.*; import org.gridgain.grid.util.typedef.*; @@ -163,7 +163,7 @@ public class GridFileSwapSpaceSpiMultithreadedLoadTest extends GridCommonAbstrac catch (IgniteSpiException e) { e.printStackTrace(); - throw new GridRuntimeException(e); + throw new IgniteException(e); } } }, N_THREADS, "store"); @@ -222,7 +222,7 @@ public class GridFileSwapSpaceSpiMultithreadedLoadTest extends GridCommonAbstrac } } } - 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/marshaller/GridMarshallerAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerAbstractTest.java index e40e9cf..26e9436 100644 --- a/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerAbstractTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerAbstractTest.java @@ -382,10 +382,10 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest /** * Tests marshal arrays of primitives. * - * @throws GridException If marshalling failed. + * @throws IgniteCheckedException If marshalling failed. */ @SuppressWarnings({"ZeroLengthArrayAllocation"}) - public void testMarshallingArrayOfPrimitives() throws GridException { + public void testMarshallingArrayOfPrimitives() throws IgniteCheckedException { char[] inChars = "vasya".toCharArray(); char[] outChars = unmarshal(marshal(inChars)); @@ -922,19 +922,19 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest /** * @param bean Object to marshal. * @return Byte buffer. - * @throws GridException Thrown if any exception occurs while marshalling. + * @throws IgniteCheckedException Thrown if any exception occurs while marshalling. */ - protected static byte[] marshal(Object bean) throws GridException { + protected static byte[] marshal(Object bean) throws IgniteCheckedException { return marsh.marshal(bean); } /** * @param buf Byte buffer to unmarshal. * @return Unmarshalled object. - * @throws GridException Thrown if any exception occurs while unmarshalling. + * @throws IgniteCheckedException Thrown if any exception occurs while unmarshalling. */ @SuppressWarnings({"RedundantTypeArguments"}) - protected static <T> T unmarshal(byte[] buf) throws GridException { + protected static <T> T unmarshal(byte[] buf) throws IgniteCheckedException { return marsh.<T>unmarshal(buf, Thread.currentThread().getContextClassLoader()); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerPerformanceTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerPerformanceTest.java b/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerPerformanceTest.java index 3c8ffaa..e4b9955 100644 --- a/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerPerformanceTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerPerformanceTest.java @@ -11,12 +11,12 @@ package org.gridgain.grid.marshaller; import com.esotericsoftware.kryo.*; import com.esotericsoftware.kryo.io.*; +import org.apache.ignite.*; import org.apache.ignite.lang.*; import org.apache.ignite.marshaller.optimized.*; -import org.gridgain.grid.*; +import org.gridgain.grid.util.lang.*; import org.gridgain.grid.util.typedef.*; import org.gridgain.grid.util.typedef.internal.*; -import org.gridgain.grid.util.lang.*; import org.gridgain.testframework.junits.common.*; import java.io.*; @@ -45,7 +45,7 @@ public class GridMarshallerPerformanceTest extends GridCommonAbstractTest { final ByteArrayOutputStream out = new ByteArrayOutputStream(); IgniteInClosure<TestObject> writer = new CIX1<TestObject>() { - @Override public void applyx(TestObject obj) throws GridException { + @Override public void applyx(TestObject obj) throws IgniteCheckedException { out.reset(); ObjectOutputStream objOut = null; @@ -56,7 +56,7 @@ public class GridMarshallerPerformanceTest extends GridCommonAbstractTest { objOut.writeObject(obj); } catch (IOException e) { - throw new GridException(e); + throw new IgniteCheckedException(e); } finally { U.close(objOut, log); @@ -65,7 +65,7 @@ public class GridMarshallerPerformanceTest extends GridCommonAbstractTest { }; IgniteOutClosure<TestObject> reader = new COX<TestObject>() { - @Override public TestObject applyx() throws GridException { + @Override public TestObject applyx() throws IgniteCheckedException { ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()); ObjectInputStream objIn = null; @@ -76,7 +76,7 @@ public class GridMarshallerPerformanceTest extends GridCommonAbstractTest { return (TestObject)objIn.readObject(); } catch (ClassNotFoundException | IOException e) { - throw new GridException(e); + throw new IgniteCheckedException(e); } finally { U.close(objIn, log); } @@ -97,13 +97,13 @@ public class GridMarshallerPerformanceTest extends GridCommonAbstractTest { marsh.setClassNames(Arrays.asList(TestObject.class.getName())); IgniteInClosure<TestObject> writer = new CIX1<TestObject>() { - @Override public void applyx(TestObject obj) throws GridException { + @Override public void applyx(TestObject obj) throws IgniteCheckedException { tuple.set(marsh.marshal(obj)); } }; IgniteOutClosure<TestObject> reader = new COX<TestObject>() { - @Override public TestObject applyx() throws GridException { + @Override public TestObject applyx() throws IgniteCheckedException { return marsh.unmarshal(tuple.get(), null); } }; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/p2p/GridAbstractMultinodeRedeployTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridAbstractMultinodeRedeployTest.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridAbstractMultinodeRedeployTest.java index 69bdef7..b6c6a28 100644 --- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridAbstractMultinodeRedeployTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridAbstractMultinodeRedeployTest.java @@ -96,7 +96,7 @@ abstract class GridAbstractMultinodeRedeployTest extends GridCommonAbstractTest int[] res2 = fut2.get(); if (res1 == null || res2 == null || res1.length != 2 || res2.length != 2) - throw new GridException("Received wrong result."); + throw new IgniteCheckedException("Received wrong result."); } } finally { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PJobClassLoaderSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PJobClassLoaderSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PJobClassLoaderSelfTest.java index ac04153..6ca5e49 100644 --- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PJobClassLoaderSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PJobClassLoaderSelfTest.java @@ -114,7 +114,7 @@ public class GridP2PJobClassLoaderSelfTest extends GridCommonAbstractTest { private static ClassLoader ldr; /** {@inheritDoc} */ - @Override protected Collection<? extends ComputeJob> split(int gridSize, Object arg) throws GridException { + @Override protected Collection<? extends ComputeJob> split(int gridSize, Object arg) throws IgniteCheckedException { assert rsrcTask != null; assert gridSize == 1; @@ -128,7 +128,7 @@ public class GridP2PJobClassLoaderSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @SuppressWarnings({"ObjectEquality"}) - public Serializable execute() throws GridException { + public Serializable execute() throws IgniteCheckedException { assert rsrcJob == rsrcTask; assert getClass().getClassLoader() == ldr; @@ -139,7 +139,7 @@ public class GridP2PJobClassLoaderSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ - @Override public Object reduce(List<ComputeJobResult> results) throws GridException { + @Override public Object reduce(List<ComputeJobResult> results) throws IgniteCheckedException { assert rsrcTask != null; // Nothing to reduce. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PLocalDeploymentSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PLocalDeploymentSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PLocalDeploymentSelfTest.java index b80afd0..33b2a57 100644 --- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PLocalDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PLocalDeploymentSelfTest.java @@ -221,7 +221,7 @@ public class GridP2PLocalDeploymentSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override public Map<? extends ComputeJob, ClusterNode> map(final List<ClusterNode> subgrid, UUID arg) - throws GridException { + throws IgniteCheckedException { taskRsrc = rsrc; @@ -232,11 +232,11 @@ public class GridP2PLocalDeploymentSelfTest extends GridCommonAbstractTest { return Collections.singletonMap(new TestJob(arg), node); } - throw new GridException("Failed to find target node: " + arg); + throw new IgniteCheckedException("Failed to find target node: " + arg); } /** {@inheritDoc} */ - @Override public int[] reduce(List<ComputeJobResult> results) throws GridException { + @Override public int[] reduce(List<ComputeJobResult> results) throws IgniteCheckedException { assert results.size() == 1; assert taskRsrc == rsrc; @@ -263,7 +263,7 @@ public class GridP2PLocalDeploymentSelfTest extends GridCommonAbstractTest { public TestJob(UUID nodeId) { super(nodeId); } /** {@inheritDoc} */ - @Override public Serializable execute() throws GridException { + @Override public Serializable execute() throws IgniteCheckedException { assert locNodeId.equals(argument(0)) == true; jobRsrc = rsrc; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PMissedResourceCacheSizeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PMissedResourceCacheSizeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PMissedResourceCacheSizeSelfTest.java index 86ca3c4..8fde401 100644 --- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PMissedResourceCacheSizeSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PMissedResourceCacheSizeSelfTest.java @@ -73,7 +73,7 @@ public class GridP2PMissedResourceCacheSizeSelfTest extends GridCommonAbstractTe } /** - * Task execution here throws {@link GridException}. + * Task execution here throws {@link IgniteCheckedException}. * This is correct behavior. * * @param g1 Grid 1. @@ -87,14 +87,14 @@ public class GridP2PMissedResourceCacheSizeSelfTest extends GridCommonAbstractTe assert false; // Exception must be thrown. } - catch (GridException e) { + catch (IgniteCheckedException e) { // Throwing exception is a correct behaviour. info("Received correct exception: " + e); } } /** - * Querying events here throws {@link GridException}. + * Querying events here throws {@link IgniteCheckedException}. * This is correct behavior. * * @param g Grid. @@ -106,7 +106,7 @@ public class GridP2PMissedResourceCacheSizeSelfTest extends GridCommonAbstractTe assert false; // Exception must be thrown. } - catch (GridException e) { + catch (IgniteCheckedException e) { // Throwing exception is a correct behaviour. info("Received correct exception: " + e); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PRecursionTaskSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PRecursionTaskSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PRecursionTaskSelfTest.java index cb59e5f..46bab5b 100644 --- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PRecursionTaskSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PRecursionTaskSelfTest.java @@ -122,7 +122,7 @@ public class GridP2PRecursionTaskSelfTest extends GridCommonAbstractTest { */ public static class FactorialTask extends ComputeTaskAdapter<Long, Long> { /** {@inheritDoc} */ - @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, Long arg) throws GridException { + @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, Long arg) throws IgniteCheckedException { assert arg > 1; Map<FactorialJob, ClusterNode> map = new HashMap<>(); @@ -143,7 +143,7 @@ public class GridP2PRecursionTaskSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ - @Override public Long reduce(List<ComputeJobResult> results) throws GridException { + @Override public Long reduce(List<ComputeJobResult> results) throws IgniteCheckedException { long retVal = 0; for (ComputeJobResult res : results) { @@ -169,7 +169,7 @@ public class GridP2PRecursionTaskSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ - @Override public Long execute() throws GridException { + @Override public Long execute() throws IgniteCheckedException { Long arg = argument(0); assert arg != null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PRemoteClassLoadersSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PRemoteClassLoadersSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PRemoteClassLoadersSelfTest.java index a6208e9..4d8dd23 100644 --- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PRemoteClassLoadersSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PRemoteClassLoadersSelfTest.java @@ -219,7 +219,7 @@ public class GridP2PRemoteClassLoadersSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ - @Override public Serializable execute() throws GridException { + @Override public Serializable execute() throws IgniteCheckedException { // Return next value. return GridP2PTestStaticVariable.staticVar++; } @@ -239,7 +239,7 @@ public class GridP2PRemoteClassLoadersSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, Serializable arg) - throws GridException { + throws IgniteCheckedException { Map<ComputeJob, ClusterNode> map = new HashMap<>(subgrid.size()); for (ClusterNode node : subgrid) { @@ -251,7 +251,7 @@ public class GridP2PRemoteClassLoadersSelfTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ - @Override public Object reduce(List<ComputeJobResult> results) throws GridException { + @Override public Object reduce(List<ComputeJobResult> results) throws IgniteCheckedException { assert results.size() == 1; ComputeJobResult res = results.get(0); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestJob.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestJob.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestJob.java index a95ea6c..a38c768 100644 --- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestJob.java +++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestJob.java @@ -41,7 +41,7 @@ public class GridP2PTestJob extends ComputeJobAdapter { } /** {@inheritDoc} */ - @Override public Serializable execute() throws GridException { + @Override public Serializable execute() throws IgniteCheckedException { assert taskSes != null; ClassLoader ldr = getClass().getClassLoader(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTask.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTask.java index 9cc1c00..d4050a8 100644 --- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTask.java +++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTask.java @@ -34,7 +34,7 @@ public class GridP2PTestTask extends ComputeTaskAdapter<Object, Integer> { private UUID nodeId; /** {@inheritDoc} */ - @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, Object arg) throws GridException { + @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, Object arg) throws IgniteCheckedException { assert subgrid != null; assert !subgrid.isEmpty(); @@ -57,7 +57,7 @@ public class GridP2PTestTask extends ComputeTaskAdapter<Object, Integer> { } /** {@inheritDoc} */ - @Override public Integer reduce(List<ComputeJobResult> results) throws GridException { + @Override public Integer reduce(List<ComputeJobResult> results) throws IgniteCheckedException { assert results.size() == 1 : "Results [received=" + results.size() + ", expected=" + 1 + ']'; ComputeJobResult res = results.get(0); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTaskExecutionTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTaskExecutionTest.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTaskExecutionTest.java index db70d02..ab7330f 100644 --- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTaskExecutionTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTestTaskExecutionTest.java @@ -12,9 +12,9 @@ import org.gridgain.testframework.junits.common.*; public final class GridP2PTestTaskExecutionTest extends GridCommonAbstractTest { /** * Method executes GridP2PTestTask. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ - public void testGridP2PTestTask() throws GridException { + public void testGridP2PTestTask() throws IgniteCheckedException { try (Ignite g = G.start()) { assert g != null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTimeoutSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTimeoutSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTimeoutSelfTest.java index a8d738b..e1aa70d 100644 --- a/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTimeoutSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/p2p/GridP2PTimeoutSelfTest.java @@ -73,7 +73,7 @@ public class GridP2PTimeoutSelfTest extends GridCommonAbstractTest { assert false; // Timeout exception must be thrown. } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { // Throwing exception is a correct behaviour. } } @@ -115,7 +115,7 @@ public class GridP2PTimeoutSelfTest extends GridCommonAbstractTest { assert false; // Timeout exception must be thrown. } - catch (GridException ignored) { + catch (IgniteCheckedException ignored) { // Throwing exception is a correct behaviour. } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromFutureSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromFutureSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromFutureSelfTest.java index aaecc4f..859d690 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromFutureSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromFutureSelfTest.java @@ -120,9 +120,9 @@ public class GridSessionCancelSiblingsFromFutureSelfTest extends GridCommonAbstr /** * @param num Task argument. * @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); @@ -193,7 +193,7 @@ public class GridSessionCancelSiblingsFromFutureSelfTest extends GridCommonAbstr private volatile int taskNum = -1; /** {@inheritDoc} */ - @Override protected Collection<? extends ComputeJob> split(int gridSize, Serializable arg) throws GridException { + @Override protected Collection<? extends ComputeJob> split(int gridSize, Serializable arg) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Splitting jobs [task=" + this + ", gridSize=" + gridSize + ", arg=" + arg + ']'); @@ -252,7 +252,7 @@ public class GridSessionCancelSiblingsFromFutureSelfTest extends GridCommonAbstr } /** {@inheritDoc} */ - @Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) throws GridException { + @Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Received job result [job=" + this + ", result=" + res + ']'); @@ -260,7 +260,7 @@ public class GridSessionCancelSiblingsFromFutureSelfTest extends GridCommonAbstr } /** {@inheritDoc} */ - @Override public String reduce(List<ComputeJobResult> results) throws GridException { + @Override public String reduce(List<ComputeJobResult> 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/GridSessionCancelSiblingsFromJobSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromJobSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromJobSelfTest.java index 1db2ae7..56d1b49 100644 --- a/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromJobSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/session/GridSessionCancelSiblingsFromJobSelfTest.java @@ -119,9 +119,9 @@ public class GridSessionCancelSiblingsFromJobSelfTest extends GridCommonAbstract /** * @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); @@ -180,7 +180,7 @@ public class GridSessionCancelSiblingsFromJobSelfTest extends GridCommonAbstract private volatile int taskNum = -1; /** {@inheritDoc} */ - @Override protected Collection<? extends ComputeJob> split(int gridSize, Serializable arg) throws GridException { + @Override protected Collection<? extends ComputeJob> split(int gridSize, Serializable arg) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Splitting job [task=" + this + ", gridSize=" + gridSize + ", arg=" + arg + ']'); @@ -203,7 +203,7 @@ public class GridSessionCancelSiblingsFromJobSelfTest extends GridCommonAbstract /** {@inheritDoc} */ @SuppressWarnings({"BusyWait"}) - @Override public Object execute() throws GridException { + @Override public Object execute() throws IgniteCheckedException { assert taskSes != null; thread = Thread.currentThread(); @@ -266,12 +266,12 @@ public class GridSessionCancelSiblingsFromJobSelfTest extends GridCommonAbstract /** {@inheritDoc} */ @Override public ComputeJobResultPolicy result(ComputeJobResult result, List<ComputeJobResult> received) - throws GridException { + throws IgniteCheckedException { return received.size() == SPLIT_COUNT ? ComputeJobResultPolicy.REDUCE : ComputeJobResultPolicy.WAIT; } /** {@inheritDoc} */ - @Override public String reduce(List<ComputeJobResult> results) throws GridException { + @Override public String reduce(List<ComputeJobResult> results) throws IgniteCheckedException { if (log.isInfoEnabled()) log.info("Aggregating job [job=" + this + ", results=" + results + ']');