Repository: incubator-ignite Updated Branches: refs/heads/ignite-54-55 ec1a01f6f -> e5b41cc82
Merge remote-tracking branch 'remotes/origin/sprint-1' into ignite-6 Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/58335075 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/58335075 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/58335075 Branch: refs/heads/ignite-54-55 Commit: 5833507503d914feb67a02ac05af03804cef7906 Parents: 06d8f2c 20d0d3f Author: sboikov <sboi...@gridgain.com> Authored: Wed Feb 4 12:43:11 2015 +0300 Committer: sboikov <sboi...@gridgain.com> Committed: Wed Feb 4 12:43:11 2015 +0300 ---------------------------------------------------------------------- .../fs/GridGgfsCommonAbstractTest.java | 4 +- .../ipc/shmem/GgfsSharedMemoryTestServer.java | 2 +- .../IpcSharedMemoryCrashDetectionSelfTest.java | 2 +- .../IpcSharedMemoryBenchmarkReader.java | 2 +- .../ignite/p2p/GridP2PUndeploySelfTest.java | 2 +- .../GridAbstractCommunicationSelfTest.java | 6 +- ...mmunicationSpiConcurrentConnectSelfTest.java | 6 +- .../tcp/GridTcpCommunicationSpiLanTest.java | 6 +- ...cpCommunicationSpiMultithreadedSelfTest.java | 6 +- ...dTcpCommunicationSpiRecoveryAckSelfTest.java | 6 +- ...GridTcpCommunicationSpiRecoverySelfTest.java | 6 +- .../GridAbstractDiscoverySelfTest.java | 12 +- .../testframework/junits/GridAbstractTest.java | 10 +- .../testframework/junits/GridTestIgnite.java | 283 ------------------- .../testframework/junits/GridTestResources.java | 255 ----------------- .../ignite/testframework/junits/IgniteMock.java | 283 +++++++++++++++++++ .../junits/IgniteTestResources.java | 255 +++++++++++++++++ .../junits/spi/GridSpiAbstractTest.java | 6 +- 18 files changed, 576 insertions(+), 576 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/58335075/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java ---------------------------------------------------------------------- diff --cc modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java index 0000000,3e9c74d..b930cbb mode 000000,100644..100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java @@@ -1,0 -1,230 +1,283 @@@ + /* @java.file.header */ + + /* _________ _____ __________________ _____ + * __ ____/___________(_)______ /__ ____/______ ____(_)_______ + * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \ + * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / / + * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/ + */ + + package org.apache.ignite.testframework.junits; + + import org.apache.ignite.*; + import org.apache.ignite.cache.*; + import org.apache.ignite.cache.affinity.*; + import org.apache.ignite.cluster.*; + import org.apache.ignite.configuration.*; + import org.apache.ignite.hadoop.*; + import org.apache.ignite.internal.product.*; + import org.apache.ignite.marshaller.*; + import org.apache.ignite.plugin.*; + import org.apache.ignite.plugin.security.*; + import org.jetbrains.annotations.*; + + import javax.management.*; + import java.util.*; + import java.util.concurrent.*; + + /** + * Ignite mock. + */ + public class IgniteMock implements Ignite { + /** Ignite name */ + private final String name; + + /** Local host. */ + private final String locHost; + + /** */ + private final UUID nodeId; + + /** */ + private IgniteMarshaller marshaller; + + /** */ + private final MBeanServer jmx; + + /** */ + private final String home; + + /** + * Mock values + * + * @param name Name. + * @param locHost Local host. + * @param nodeId Node ID. + * @param marshaller Marshaller. + * @param jmx Jmx Bean Server. + * @param home Ignite home. + */ + public IgniteMock( + String name, String locHost, UUID nodeId, IgniteMarshaller marshaller, MBeanServer jmx, String home) { + this.locHost = locHost; + this.nodeId = nodeId; + this.marshaller = marshaller; + this.jmx = jmx; + this.home = home; + this.name = name; + } + + /** {@inheritDoc} */ + @Override public String name() { + return name; + } + + /** {@inheritDoc} */ + @Override public IgniteLogger log() { + return null; + } + + /** {@inheritDoc} */ + @Override public IgniteConfiguration configuration() { + IgniteConfiguration cfg = new IgniteConfiguration(); + + cfg.setMarshaller(marshaller); + cfg.setNodeId(nodeId); + cfg.setMBeanServer(jmx); + cfg.setGridGainHome(home); + cfg.setLocalHost(locHost); + + return cfg; + } + + /** {@inheritDoc} */ + @Override public IgniteCluster cluster() { + return null; + } + + /** {@inheritDoc} */ + @Override public IgniteCompute compute() { + return null; + } + + /** {@inheritDoc} */ + @Override public IgniteCompute compute(ClusterGroup prj) { + return null; + } + + /** {@inheritDoc} */ + @Override public IgniteMessaging message() { + return null; + } + + /** {@inheritDoc} */ + @Override public IgniteMessaging message(ClusterGroup prj) { + return null; + } + + /** {@inheritDoc} */ + @Override public IgniteEvents events() { + return null; + } + + /** {@inheritDoc} */ + @Override public IgniteEvents events(ClusterGroup prj) { + return null; + } + + /** {@inheritDoc} */ + @Override public IgniteManaged managed() { + return null; + } + + /** {@inheritDoc} */ + @Override public IgniteManaged managed(ClusterGroup prj) { + return null; + } + + /** {@inheritDoc} */ + @Override public ExecutorService executorService() { + return null; + } + + /** {@inheritDoc} */ + @Override public ExecutorService executorService(ClusterGroup prj) { + return null; + } + + /** {@inheritDoc} */ + @Override public IgniteProduct product() { + return null; + } + + /** {@inheritDoc} */ + @Override public IgniteScheduler scheduler() { + return null; + } + + /** {@inheritDoc} */ + @Override public GridSecurity security() { + return null; + } + + /** {@inheritDoc} */ + @Override public IgnitePortables portables() { + return null; + } + + /** {@inheritDoc} */ + @Override public <K, V> GridCache<K, V> cache(@Nullable String name) { + return null; + } + + /** {@inheritDoc} */ + @Override public Collection<GridCache<?, ?>> caches() { + return null; + } + + /** {@inheritDoc} */ + @Override public <K, V> IgniteCache<K, V> jcache(@Nullable String name) { + return null; + } + + /** {@inheritDoc} */ + @Override public IgniteTransactions transactions() { + return null; + } + + /** {@inheritDoc} */ + @Override public <K, V> IgniteDataLoader<K, V> dataLoader(@Nullable String cacheName) { + return null; + } + + /** {@inheritDoc} */ + @Override public IgniteFs fileSystem(String name) { + return null; + } + + /** {@inheritDoc} */ + @Override public Collection<IgniteFs> fileSystems() { + return null; + } + + /** {@inheritDoc} */ + @Override public GridHadoop hadoop() { + return null; + } + + /** {@inheritDoc} */ + @Override public IgniteStreamer streamer(@Nullable String name) { + return null; + } + + /** {@inheritDoc} */ + @Override public Collection<IgniteStreamer> streamers() { + return null; + } + + /** {@inheritDoc} */ + @Override public <T extends IgnitePlugin> T plugin(String name) throws PluginNotFoundException { + return null; + } + + /** {@inheritDoc} */ ++ @Nullable @Override public IgniteAtomicSequence atomicSequence(String name, long initVal, boolean create) { ++ return null; ++ } ++ ++ /** {@inheritDoc} */ ++ @Nullable @Override public IgniteAtomicLong atomicLong(String name, long initVal, boolean create) { ++ return null; ++ } ++ ++ /** {@inheritDoc} */ ++ @Nullable @Override public <T> IgniteAtomicReference<T> atomicReference(String name, ++ @Nullable T initVal, ++ boolean create) ++ { ++ return null; ++ } ++ ++ /** {@inheritDoc} */ ++ @Nullable @Override public <T, S> IgniteAtomicStamped<T, S> atomicStamped(String name, ++ @Nullable T initVal, ++ @Nullable S initStamp, ++ boolean create) ++ { ++ return null; ++ } ++ ++ /** {@inheritDoc} */ ++ @Nullable @Override public IgniteCountDownLatch countDownLatch(String name, ++ int cnt, ++ boolean autoDel, ++ boolean create) ++ { ++ return null; ++ } ++ ++ /** {@inheritDoc} */ ++ @Nullable @Override public <T> IgniteQueue<T> queue(String name, ++ IgniteCollectionConfiguration cfg, ++ int cap, ++ boolean create) ++ { ++ return null; ++ } ++ ++ /** {@inheritDoc} */ ++ @Nullable @Override public <T> IgniteSet<T> set(String name, ++ IgniteCollectionConfiguration cfg, ++ boolean create) ++ { ++ return null; ++ } ++ ++ /** {@inheritDoc} */ + @Override public void close() throws IgniteCheckedException {} + + /** {@inheritDoc} */ + @Override public <K> CacheAffinity<K> affinity(String cacheName) { + return null; + } + }