ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [03/47] ignite git commit: IGNITE-5267 - Moved ignite-ps module to ignite-core
Date Sun, 11 Jun 2017 20:03:29 GMT
http://git-wip-us.apache.org/repos/asf/ignite/blob/6bf5ce46/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteChangeGlobalStateDataStructureTest.java
----------------------------------------------------------------------
diff --git a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteChangeGlobalStateDataStructureTest.java b/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteChangeGlobalStateDataStructureTest.java
deleted file mode 100644
index d10521e..0000000
--- a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteChangeGlobalStateDataStructureTest.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.database.standbycluster;
-
-import java.util.concurrent.Callable;
-import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteAtomicLong;
-import org.apache.ignite.IgniteAtomicSequence;
-import org.apache.ignite.IgniteCountDownLatch;
-import org.apache.ignite.internal.IgniteEx;
-import org.apache.ignite.internal.processors.cache.GridCacheProcessor;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.internal.U;
-
-import static org.apache.ignite.testframework.GridTestUtils.runAsync;
-
-/**
- *
- */
-public class IgniteChangeGlobalStateDataStructureTest extends IgniteChangeGlobalStateAbstractTest {
-    /**
-     *
-     */
-    public void testDeActivateAndActivateAtomicLong() throws Exception{
-        String lName = "myLong";
-
-        Ignite ig1 = primary(0);
-        Ignite ig2 = primary(1);
-        Ignite ig3 = primary(2);
-
-        IgniteAtomicLong lexp = ig1.atomicLong(lName, 100, true);
-
-        lexp.incrementAndGet();
-        lexp.incrementAndGet();
-        lexp.incrementAndGet();
-
-        assertTrue(ig1.active());
-        assertTrue(ig2.active());
-        assertTrue(ig3.active());
-
-        ig2.active(false);
-
-        IgniteEx ex1 = (IgniteEx)ig1;
-        IgniteEx ex2 = (IgniteEx)ig2;
-        IgniteEx ex3 = (IgniteEx)ig3;
-
-        GridCacheProcessor cache1 = ex1.context().cache();
-        GridCacheProcessor cache2 = ex2.context().cache();
-        GridCacheProcessor cache3 = ex3.context().cache();
-
-        assertTrue(F.isEmpty(cache1.jcaches()));
-        assertTrue(F.isEmpty(cache2.jcaches()));
-        assertTrue(F.isEmpty(cache3.jcaches()));
-
-        assertTrue(!ig1.active());
-        assertTrue(!ig2.active());
-        assertTrue(!ig3.active());
-
-        ig3.active(true);
-
-        assertTrue(ig1.active());
-        assertTrue(ig2.active());
-        assertTrue(ig3.active());
-
-        IgniteAtomicLong lact1 = ig1.atomicLong(lName, 0, false);
-        IgniteAtomicLong lact2 = ig2.atomicLong(lName, 0, false);
-        IgniteAtomicLong lact3 = ig3.atomicLong(lName, 0, false);
-
-        assertEquals(103, lact1.get());
-        assertEquals(103, lact2.get());
-        assertEquals(103, lact3.get());
-
-        lact1.incrementAndGet();
-
-        assertEquals(104, lact1.get());
-        assertEquals(104, lact2.get());
-        assertEquals(104, lact3.get());
-
-        lact2.incrementAndGet();
-
-        assertEquals(105, lact1.get());
-        assertEquals(105, lact2.get());
-        assertEquals(105, lact3.get());
-
-        lact3.incrementAndGet();
-
-        assertEquals(106, lact3.get());
-        assertEquals(106, lact3.get());
-        assertEquals(106, lact3.get());
-    }
-
-    /**
-     *
-     */
-    public void testDeActivateAndActivateCountDownLatch() throws Exception {
-        final AtomicInteger cnt = new AtomicInteger();
-
-        String latchName = "myLatch";
-
-        Ignite ig1 = primary(0);
-        Ignite ig2 = primary(1);
-        Ignite ig3 = primary(2);
-
-        IgniteCountDownLatch latchExp1 = ig1.countDownLatch(latchName, 5, false, true);
-
-        latchExp1.countDown();
-
-        assertEquals(4, latchExp1.count());
-
-        assertTrue(ig1.active());
-        assertTrue(ig2.active());
-        assertTrue(ig3.active());
-
-        ig2.active(false);
-
-        IgniteEx ex1 = (IgniteEx)ig1;
-        IgniteEx ex2 = (IgniteEx)ig2;
-        IgniteEx ex3 = (IgniteEx)ig3;
-
-        GridCacheProcessor cache1 = ex1.context().cache();
-        GridCacheProcessor cache2 = ex2.context().cache();
-        GridCacheProcessor cache3 = ex3.context().cache();
-
-        assertTrue(F.isEmpty(cache1.jcaches()));
-        assertTrue(F.isEmpty(cache2.jcaches()));
-        assertTrue(F.isEmpty(cache3.jcaches()));
-
-        assertTrue(!ig1.active());
-        assertTrue(!ig2.active());
-        assertTrue(!ig3.active());
-
-        ig3.active(true);
-
-        assertTrue(ig1.active());
-        assertTrue(ig2.active());
-        assertTrue(ig3.active());
-
-        final IgniteCountDownLatch latchAct1 = ig1.countDownLatch(latchName, 0, false, false);
-        final IgniteCountDownLatch latchAct2 = ig2.countDownLatch(latchName, 0, false, false);
-        final IgniteCountDownLatch latchAct3 = ig3.countDownLatch(latchName, 0, false, false);
-
-        runAsync(new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                latchAct1.await();
-                cnt.incrementAndGet();
-                return null;
-            }
-        });
-
-        runAsync(new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                latchAct2.await();
-                cnt.incrementAndGet();
-                return null;
-            }
-        });
-
-        runAsync(new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                latchAct3.await();
-                cnt.incrementAndGet();
-                return null;
-            }
-        });
-
-
-        assertEquals(4, latchAct1.count());
-        assertEquals(4, latchAct2.count());
-        assertEquals(4, latchAct3.count());
-
-        latchAct1.countDown();
-        latchAct2.countDown();
-        latchAct3.countDown();
-
-        assertEquals(1, latchAct1.count());
-        assertEquals(1, latchAct2.count());
-        assertEquals(1, latchAct3.count());
-
-        latchAct1.countDown();
-
-        U.sleep(3000);
-
-        assertEquals(3, cnt.get());
-    }
-
-    /**
-     *
-     */
-    public void testDeActivateAndActivateAtomicSequence(){
-        String seqName = "mySeq";
-
-        Ignite ig1 = primary(0);
-        Ignite ig2 = primary(1);
-        Ignite ig3 = primary(2);
-
-        IgniteAtomicSequence seqExp1 = ig1.atomicSequence(seqName, 0, true);
-        IgniteAtomicSequence seqExp2 = ig2.atomicSequence(seqName, 0, false);
-        IgniteAtomicSequence seqExp3 = ig3.atomicSequence(seqName, 0, false);
-
-        assertEquals(0, seqExp1.get());
-        assertEquals(1000, seqExp2.get());
-        assertEquals(2000, seqExp3.get());
-
-        seqExp1.incrementAndGet();
-        seqExp2.incrementAndGet();
-        seqExp3.incrementAndGet();
-
-        assertTrue(ig1.active());
-        assertTrue(ig2.active());
-        assertTrue(ig3.active());
-
-        ig2.active(false);
-
-        IgniteEx ex1 = (IgniteEx)ig1;
-        IgniteEx ex2 = (IgniteEx)ig2;
-        IgniteEx ex3 = (IgniteEx)ig3;
-
-        GridCacheProcessor cache1 = ex1.context().cache();
-        GridCacheProcessor cache2 = ex2.context().cache();
-        GridCacheProcessor cache3 = ex3.context().cache();
-
-        assertTrue(F.isEmpty(cache1.jcaches()));
-        assertTrue(F.isEmpty(cache2.jcaches()));
-        assertTrue(F.isEmpty(cache3.jcaches()));
-
-        assertTrue(!ig1.active());
-        assertTrue(!ig2.active());
-        assertTrue(!ig3.active());
-
-        ig3.active(true);
-
-        assertTrue(ig1.active());
-        assertTrue(ig2.active());
-        assertTrue(ig3.active());
-
-        IgniteAtomicSequence seqAct1 = ig1.atomicSequence(seqName, 0, false);
-        IgniteAtomicSequence seqAct2 = ig2.atomicSequence(seqName, 0, false);
-        IgniteAtomicSequence seqAct3 = ig3.atomicSequence(seqName, 0, false);
-
-        assertEquals(1, seqAct1.get());
-        assertEquals(1001, seqAct2.get());
-        assertEquals(2001, seqAct3.get());
-
-        seqAct1.incrementAndGet();
-
-        assertEquals(2, seqAct1.get());
-        assertEquals(1001, seqAct2.get());
-        assertEquals(2001, seqAct3.get());
-
-        seqAct2.incrementAndGet();
-
-        assertEquals(2, seqAct1.get());
-        assertEquals(1002, seqAct2.get());
-        assertEquals(2001, seqAct3.get());
-
-        seqAct3.incrementAndGet();
-
-        assertEquals(2, seqAct1.get());
-        assertEquals(1002, seqAct2.get());
-        assertEquals(2002, seqAct3.get());
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6bf5ce46/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteChangeGlobalStateFailOverTest.java
----------------------------------------------------------------------
diff --git a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteChangeGlobalStateFailOverTest.java b/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteChangeGlobalStateFailOverTest.java
deleted file mode 100644
index 53a2eec..0000000
--- a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteChangeGlobalStateFailOverTest.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.database.standbycluster;
-
-import java.util.concurrent.Callable;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.internal.IgniteInternalFuture;
-
-import static java.lang.Thread.sleep;
-import static org.apache.ignite.testframework.GridTestUtils.runAsync;
-
-/**
- *
- */
-public class IgniteChangeGlobalStateFailOverTest extends IgniteChangeGlobalStateAbstractTest {
-    /** {@inheritDoc} */
-    @Override protected int primaryNodes() {
-        return 0;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected int primaryClientNodes() {
-        return 0;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected int backUpClientNodes() {
-        return 0;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected int backUpNodes() {
-        return 4;
-    }
-
-    /**
-     *
-     */
-    public void testActivateDeActivateOnFixTopology() throws Exception {
-        final Ignite igB1 = backUp(0);
-        final Ignite igB2 = backUp(1);
-        final Ignite igB3 = backUp(2);
-
-        assertTrue(!igB1.active());
-        assertTrue(!igB2.active());
-        assertTrue(!igB3.active());
-
-        final AtomicInteger cntA = new AtomicInteger();
-        final AtomicInteger cntD = new AtomicInteger();
-
-        final AtomicLong timeA = new AtomicLong();
-        final AtomicLong timeD = new AtomicLong();
-
-        final AtomicBoolean stop = new AtomicBoolean();
-
-        final AtomicBoolean canAct = new AtomicBoolean(true);
-
-        try {
-            final IgniteInternalFuture<Void> af = runAsync(new Callable<Void>() {
-                @Override public Void call() throws Exception {
-                    while (!stop.get()) {
-                        Ignite ig = randomBackUp(false);
-
-                        if (canAct.get()) {
-                            long start = System.currentTimeMillis();
-
-                            ig.active(true);
-
-                            timeA.addAndGet((System.currentTimeMillis() - start));
-
-                            cntA.incrementAndGet();
-
-                            for (Ignite ign : allBackUpNodes())
-                                assertTrue(ign.active());
-
-                            canAct.set(false);
-                        }
-
-                    }
-                    return null;
-                }
-            });
-
-            final IgniteInternalFuture<Void> df = runAsync(new Callable<Void>() {
-                @Override public Void call() throws Exception {
-                    while (!stop.get()) {
-                        Ignite ig = randomBackUp(false);
-
-                        if (!canAct.get()) {
-                            long start = System.currentTimeMillis();
-
-                            ig.active(false);
-
-                            timeD.addAndGet((System.currentTimeMillis() - start));
-
-                            cntD.incrementAndGet();
-
-                            for (Ignite ign : allBackUpNodes())
-                                assertTrue(!ign.active());
-
-                            canAct.set(true);
-                        }
-
-                    }
-                    return null;
-                }
-            });
-
-            sleep(60_000);
-
-            stop.set(true);
-
-            af.get();
-            df.get();
-        }
-        finally {
-            log.info("total activate/deactivate:" + cntA.get() + "/" + cntD.get() + " aTime/dTime:"
-                + (timeA.get() / cntA.get() + "/" + (timeD.get() / cntD.get()) + " nodes: " + backUpNodes()));
-        }
-    }
-
-    /**
-     *
-     */
-    public void testActivateDeActivateOnJoiningNode() throws Exception {
-        final Ignite igB1 = backUp(0);
-        final Ignite igB2 = backUp(1);
-        final Ignite igB3 = backUp(2);
-
-        assertTrue(!igB1.active());
-        assertTrue(!igB2.active());
-        assertTrue(!igB3.active());
-
-        final AtomicInteger cntA = new AtomicInteger();
-        final AtomicInteger cntD = new AtomicInteger();
-
-        final AtomicLong timeA = new AtomicLong();
-        final AtomicLong timeD = new AtomicLong();
-
-        final AtomicBoolean stop = new AtomicBoolean();
-
-        final AtomicBoolean canAct = new AtomicBoolean(true);
-        final AtomicInteger seqIdx = new AtomicInteger(backUpNodes());
-
-        try {
-            final IgniteInternalFuture<Void> af = runAsync(new Callable<Void>() {
-                @Override public Void call() throws Exception {
-                    while (!stop.get()) {
-                        Ignite ig = randomBackUp(false);
-
-                        if (canAct.get()) {
-                            long start = System.currentTimeMillis();
-
-                            ig.active(true);
-
-                            timeA.addAndGet((System.currentTimeMillis() - start));
-
-                            cntA.incrementAndGet();
-
-                            for (Ignite ign : allBackUpNodes())
-                                assertTrue(ign.active());
-
-                            canAct.set(false);
-                        }
-
-                    }
-                    return null;
-                }
-            });
-
-            final IgniteInternalFuture<Void> df = runAsync(new Callable<Void>() {
-                @Override public Void call() throws Exception {
-                    while (!stop.get()) {
-                        Ignite ig = randomBackUp(false);
-
-                        if (!canAct.get()) {
-                            long start = System.currentTimeMillis();
-
-                            ig.active(false);
-
-                            timeD.addAndGet((System.currentTimeMillis() - start));
-
-                            cntD.incrementAndGet();
-
-                            for (Ignite ign : allBackUpNodes())
-                                assertTrue(!ign.active());
-
-                            canAct.set(true);
-                        }
-
-                    }
-                    return null;
-                }
-            });
-
-            IgniteInternalFuture<Void> jf1 = runAsync(new Callable<Void>() {
-                @Override public Void call() throws Exception {
-                    while (!stop.get())
-                        startBackUp(seqIdx.incrementAndGet());
-
-                    return null;
-                }
-            });
-
-            IgniteInternalFuture<Void> jf2 = runAsync(new Callable<Void>() {
-                @Override public Void call() throws Exception {
-                    while (!stop.get())
-                        startBackUp(seqIdx.incrementAndGet());
-
-                    return null;
-                }
-            });
-
-            sleep(60_000);
-
-            stop.set(true);
-
-            af.get();
-            df.get();
-            jf1.get();
-            jf2.get();
-        }
-        finally {
-            log.info("total started nodes: " + (seqIdx.get() - backUpNodes()));
-
-            log.info("total activate/deactivate:" + cntA.get() + "/" + cntD.get() + " aTime/dTime: "
-                + (timeA.get() / cntA.get() + "/" + (timeD.get() / cntD.get()))
-            );
-        }
-    }
-
-    /**
-     *
-     */
-    public void testActivateDeActivateOnFixTopologyWithPutValues() throws Exception {
-        final Ignite igB1 = backUp(0);
-        final Ignite igB2 = backUp(1);
-        final Ignite igB3 = backUp(2);
-
-        assertTrue(!igB1.active());
-        assertTrue(!igB2.active());
-        assertTrue(!igB3.active());
-
-        final CacheConfiguration<String, String> ccfg = new CacheConfiguration<>();
-        ccfg.setName("main-cache");
-
-        final AtomicInteger cnt = new AtomicInteger();
-
-        final AtomicInteger cntA = new AtomicInteger();
-        final AtomicInteger cntD = new AtomicInteger();
-
-        final AtomicLong timeA = new AtomicLong();
-        final AtomicLong timeD = new AtomicLong();
-
-        final AtomicBoolean stop = new AtomicBoolean();
-
-        final AtomicBoolean canAct = new AtomicBoolean(true);
-
-        try {
-            final IgniteInternalFuture<Void> af = runAsync(new Callable<Void>() {
-                @Override public Void call() throws Exception {
-                    while (!stop.get()) {
-                        Ignite ig = randomBackUp(false);
-
-                        if (canAct.get()) {
-                            long start = System.currentTimeMillis();
-
-                            ig.active(true);
-
-                            IgniteCache<String, String> cache = ig.getOrCreateCache(ccfg);
-
-                            cache.put("key" + cnt.get(), "value" + cnt.get());
-
-                            cnt.incrementAndGet();
-
-                            timeA.addAndGet((System.currentTimeMillis() - start));
-
-                            cntA.incrementAndGet();
-
-                            for (Ignite ign : allBackUpNodes())
-                                assertTrue(ign.active());
-
-                            canAct.set(false);
-                        }
-
-                    }
-                    return null;
-                }
-            });
-
-            final IgniteInternalFuture<Void> df = runAsync(new Callable<Void>() {
-                @Override public Void call() throws Exception {
-                    while (!stop.get()) {
-                        Ignite ig = randomBackUp(false);
-
-                        if (!canAct.get()) {
-                            long start = System.currentTimeMillis();
-
-                            IgniteCache<String, String> cache = ig.getOrCreateCache(ccfg);
-
-                            for (int i = 0; i < cnt.get(); i++)
-                                assertEquals("value" + i, cache.get("key" + i));
-
-                            ig.active(false);
-
-                            timeD.addAndGet((System.currentTimeMillis() - start));
-
-                            cntD.incrementAndGet();
-
-                            for (Ignite ign : allBackUpNodes())
-                                assertTrue(!ign.active());
-
-                            canAct.set(true);
-                        }
-
-                    }
-                    return null;
-                }
-            });
-
-            sleep(60_000);
-
-            stop.set(true);
-
-            af.get();
-            df.get();
-        }
-        finally {
-            log.info("total activate/deactivate:" + cntA.get() + "/" + cntD.get() + " aTime/dTime:"
-                + (timeA.get() / cntA.get() + "/" + (timeD.get() / cntD.get()) + " nodes: " + backUpNodes()));
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6bf5ce46/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteChangeGlobalStateServiceTest.java
----------------------------------------------------------------------
diff --git a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteChangeGlobalStateServiceTest.java b/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteChangeGlobalStateServiceTest.java
deleted file mode 100644
index da4d20c..0000000
--- a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteChangeGlobalStateServiceTest.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.database.standbycluster;
-
-import java.util.Collection;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.services.Service;
-import org.apache.ignite.services.ServiceConfiguration;
-import org.apache.ignite.services.ServiceContext;
-import org.apache.ignite.services.ServiceDescriptor;
-
-/**
- *
- */
-public class IgniteChangeGlobalStateServiceTest extends IgniteChangeGlobalStateAbstractTest {
-    /** {@inheritDoc} */
-    @Override protected int backUpClientNodes() {
-        return 0;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected int primaryNodes() {
-        return 1;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected int backUpNodes() {
-        return 1;
-    }
-
-    /**
-     *
-     */
-    public void testDeployService() throws Exception {
-        Ignite ig1P = primary(0);
-
-        Ignite ig1B = backUp(0);
-
-        String serName = "service";
-
-        ServiceConfiguration serConf = new ServiceConfiguration();
-        serConf.setTotalCount(1);
-        serConf.setName(serName);
-        serConf.setService(new TestService());
-
-        ig1P.services().deploy(serConf);
-
-        stopAllPrimary();
-
-        ig1B.active(true);
-
-        U.sleep(3000);
-
-        Collection<ServiceDescriptor> descs = ig1B.services().serviceDescriptors();
-
-        assertTrue(!F.isEmpty(descs));
-
-        TestService srv = ig1B.services().service(serName);
-
-        assertTrue(srv != null);
-    }
-
-    /**
-     *
-     */
-    private static class TestService implements Service{
-        /** */
-        private static final long serialVersionUID = 0L;
-
-        /** {@inheritDoc} */
-        @Override public void cancel(ServiceContext ctx) {
-            System.out.println("cancel service");
-        }
-
-        /** {@inheritDoc} */
-        @Override public void init(ServiceContext ctx) throws Exception {
-            System.out.println("init service");
-        }
-
-        /** {@inheritDoc} */
-        @Override public void execute(ServiceContext ctx) throws Exception {
-            System.out.println("execute service");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6bf5ce46/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteChangeGlobalStateTest.java
----------------------------------------------------------------------
diff --git a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteChangeGlobalStateTest.java b/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteChangeGlobalStateTest.java
deleted file mode 100644
index d87ec5e..0000000
--- a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteChangeGlobalStateTest.java
+++ /dev/null
@@ -1,711 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.database.standbycluster;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CyclicBarrier;
-import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteAtomicSequence;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.IgniteServices;
-import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.internal.IgniteEx;
-import org.apache.ignite.internal.IgniteInternalFuture;
-import org.apache.ignite.internal.processors.cache.GridCacheProcessor;
-import org.apache.ignite.internal.util.typedef.F;
-
-import static org.apache.ignite.testframework.GridTestUtils.assertThrows;
-import static org.apache.ignite.testframework.GridTestUtils.runAsync;
-
-/**
- *
- */
-public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstractTest {
-    /**
-     * @throws Exception if fail.
-     */
-    public void testStopPrimaryAndActivateFromServerNode() throws Exception {
-        Ignite ig1P = primary(0);
-        Ignite ig2P = primary(1);
-        Ignite ig3P = primary(2);
-
-        Ignite ig1B = backUp(0);
-        Ignite ig2B = backUp(1);
-        Ignite ig3B = backUp(2);
-
-        assertTrue(ig1P.active());
-        assertTrue(ig2P.active());
-        assertTrue(ig3P.active());
-
-        assertTrue(!ig1B.active());
-        assertTrue(!ig2B.active());
-        assertTrue(!ig3B.active());
-
-        stopAllPrimary();
-
-        ig2B.active(true);
-
-        assertTrue(ig1B.active());
-        assertTrue(ig2B.active());
-        assertTrue(ig3B.active());
-    }
-
-    /**
-     * @throws Exception if fail.
-     */
-    public void testStopPrimaryAndActivateFromClientNode() throws Exception {
-        Ignite ig1P = primary(0);
-        Ignite ig2P = primary(1);
-        Ignite ig3P = primary(2);
-
-        Ignite ig1B = backUp(0);
-        Ignite ig2B = backUp(1);
-        Ignite ig3B = backUp(2);
-
-        Ignite ig1C = backUpClient(0);
-        Ignite ig2C = backUpClient(1);
-        Ignite ig3C = backUpClient(2);
-
-        assertTrue(ig1P.active());
-        assertTrue(ig2P.active());
-        assertTrue(ig3P.active());
-
-        assertTrue(!ig1B.active());
-        assertTrue(!ig2B.active());
-        assertTrue(!ig3B.active());
-
-        assertTrue(!ig1C.active());
-        assertTrue(!ig2C.active());
-        assertTrue(!ig3C.active());
-
-        stopAllPrimary();
-
-        ig2B.active(true);
-
-        assertTrue(ig1B.active());
-        assertTrue(ig2B.active());
-        assertTrue(ig3B.active());
-
-        assertTrue(ig1C.active());
-        assertTrue(ig2C.active());
-        assertTrue(ig3C.active());
-    }
-
-    /**
-     * @throws Exception if fail.
-     */
-    public void testConcurrentActivateFromClientNodeAndServerNode() throws Exception {
-        final Ignite ig1B = backUp(0);
-        final Ignite ig2B = backUp(1);
-        final Ignite ig3B = backUp(2);
-
-        final Ignite ig1C = backUpClient(0);
-        final Ignite ig2C = backUpClient(1);
-        final Ignite ig3C = backUpClient(2);
-
-        assertTrue(!ig1B.active());
-        assertTrue(!ig2B.active());
-        assertTrue(!ig3B.active());
-
-        stopAllPrimary();
-
-        final AtomicInteger exCnt = new AtomicInteger();
-
-        final CyclicBarrier barrier = new CyclicBarrier(backUpNodes() + backUpClientNodes());
-
-        IgniteInternalFuture<Void> f1 = runAsync(new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                try {
-                    barrier.await();
-                    ig1B.active(true);
-                }catch (Exception e){
-                    exCnt.incrementAndGet();
-                }
-                return null;
-            }
-        });
-
-        IgniteInternalFuture<Void> f2 = runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    barrier.await();
-                    ig2B.active(true);
-                }catch (Exception e){
-                    exCnt.incrementAndGet();
-                }
-            }
-        });
-
-        IgniteInternalFuture<Void> f3 = runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    barrier.await();
-                    ig3B.active(true);
-                }catch (Exception e){
-                    exCnt.incrementAndGet();
-                }
-            }
-        });
-
-        IgniteInternalFuture<Void> f4 = runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    barrier.await();
-                    ig1C.active(true);
-                }catch (Exception e){
-                    exCnt.incrementAndGet();
-                }
-            }
-        });
-
-        IgniteInternalFuture<Void> f5 = runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    barrier.await();
-                    ig2C.active(true);
-                }catch (Exception e){
-                    exCnt.incrementAndGet();
-                }
-            }
-        });
-
-        IgniteInternalFuture<Void> f6 = runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    barrier.await();
-                    ig3C.active(true);
-                }catch (Exception e){
-                    exCnt.incrementAndGet();
-                }
-            }
-        });
-
-        f1.get();
-        f2.get();
-        f3.get();
-
-        f4.get();
-        f5.get();
-        f6.get();
-
-        assertTrue(exCnt.get() > 0);
-
-        assertTrue(ig1B.active());
-        assertTrue(ig2B.active());
-        assertTrue(ig3B.active());
-
-        assertTrue(ig1C.active());
-        assertTrue(ig2C.active());
-        assertTrue(ig3C.active());
-    }
-
-    /**
-     * @throws Exception if fail.
-     */
-    public void testConcurrentActivateFromServerNode() throws Exception {
-        final Ignite ig1B = backUp(0);
-        final Ignite ig2B = backUp(1);
-        final Ignite ig3B = backUp(2);
-
-        assertTrue(!ig1B.active());
-        assertTrue(!ig2B.active());
-        assertTrue(!ig3B.active());
-
-        stopAllPrimary();
-
-        final AtomicInteger exCnt = new AtomicInteger();
-
-        final CyclicBarrier barrier = new CyclicBarrier(3);
-
-        IgniteInternalFuture<Void> act1 = runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    barrier.await();
-                    ig1B.active(true);
-                }catch (Exception e){
-                    exCnt.incrementAndGet();
-                }
-            }
-        });
-
-        IgniteInternalFuture<Void> act2 = runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    barrier.await();
-                    ig2B.active(true);
-                }catch (Exception e){
-                    exCnt.incrementAndGet();
-                }
-            }
-        });
-
-        IgniteInternalFuture<Void> act3 = runAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    barrier.await();
-                    ig3B.active(true);
-                }catch (Exception e){
-                    exCnt.incrementAndGet();
-                }
-            }
-        });
-
-        act1.get();
-        act2.get();
-        act3.get();
-
-        assertEquals(2, exCnt.get());
-
-        assertTrue(ig1B.active());
-        assertTrue(ig2B.active());
-        assertTrue(ig3B.active());
-    }
-
-    /**
-     *
-     */
-    public void testActiveAndInActiveAtTheSameTimeCluster() throws Exception {
-        Ignite ig1P = primary(0);
-        Ignite ig2P = primary(1);
-        Ignite ig3P = primary(2);
-
-        Ignite ig1B = backUp(0);
-        Ignite ig2B = backUp(1);
-        Ignite ig3B = backUp(2);
-
-        assertTrue(ig1P.cluster().nodes().size() == 6);
-        assertTrue(ig2P.cluster().nodes().size() == 6);
-        assertTrue(ig3P.cluster().nodes().size() == 6);
-
-        List<ClusterNode> primaryNodes = Arrays.asList(
-            ig1P.cluster().localNode(), ig2P.cluster().localNode(), ig3P.cluster().localNode()
-        );
-
-        List<ClusterNode> backUpNodes = Arrays.asList(
-            ig1B.cluster().localNode(), ig3B.cluster().localNode(), ig3B.cluster().localNode()
-        );
-
-        assertTrue(!ig1P.cluster().forRemotes().nodes().containsAll(backUpNodes));
-        assertTrue(!ig2P.cluster().forRemotes().nodes().containsAll(backUpNodes));
-        assertTrue(!ig3P.cluster().forRemotes().nodes().containsAll(backUpNodes));
-
-        assertTrue(ig1B.cluster().nodes().size() == 6);
-        assertTrue(ig2B.cluster().nodes().size() == 6);
-        assertTrue(ig3B.cluster().nodes().size() == 6);
-
-        assertTrue(!ig1B.cluster().forRemotes().nodes().containsAll(primaryNodes));
-        assertTrue(!ig2B.cluster().forRemotes().nodes().containsAll(primaryNodes));
-        assertTrue(!ig3B.cluster().forRemotes().nodes().containsAll(primaryNodes));
-    }
-
-    /**
-     *
-     */
-    public void testActivateOnAlreadyActivatedCluster() throws Exception {
-        Ignite ig1P = primary(0);
-        Ignite ig2P = primary(1);
-        Ignite ig3P = primary(2);
-
-        Ignite ig1B = backUp(0);
-        Ignite ig2B = backUp(1);
-        Ignite ig3B = backUp(2);
-
-        Ignite ig1C = backUpClient(0);
-        Ignite ig2C = backUpClient(1);
-        Ignite ig3C = backUpClient(2);
-
-        assertTrue(ig1P.active());
-        assertTrue(ig2P.active());
-        assertTrue(ig3P.active());
-
-        assertTrue(!ig1B.active());
-        assertTrue(!ig2B.active());
-        assertTrue(!ig3B.active());
-
-        assertTrue(!ig1C.active());
-        assertTrue(!ig2C.active());
-        assertTrue(!ig3C.active());
-
-        stopAllPrimary();
-
-        ig2B.active(true);
-
-        assertTrue(ig1B.active());
-        assertTrue(ig2B.active());
-        assertTrue(ig3B.active());
-
-        assertTrue(ig1C.active());
-        assertTrue(ig2C.active());
-        assertTrue(ig3C.active());
-
-        ig1B.active(true);
-        ig2B.active(true);
-        ig3B.active(true);
-
-        ig1C.active(true);
-        ig2C.active(true);
-        ig3C.active(true);
-
-        assertTrue(ig1B.active());
-        assertTrue(ig2B.active());
-        assertTrue(ig3B.active());
-
-        assertTrue(ig1C.active());
-        assertTrue(ig2C.active());
-        assertTrue(ig3C.active());
-    }
-
-    /**
-     *
-     */
-    public void testTryUseCacheInActiveCluster() throws Exception {
-        Ignite ig1B = backUp(0);
-        Ignite ig2B = backUp(1);
-        Ignite ig3B = backUp(2);
-
-        Ignite ig1C = backUpClient(0);
-        Ignite ig2C = backUpClient(1);
-        Ignite ig3C = backUpClient(2);
-
-        assertTrue(!ig1B.active());
-        assertTrue(!ig2B.active());
-        assertTrue(!ig3B.active());
-
-        assertTrue(!ig1C.active());
-        assertTrue(!ig2C.active());
-        assertTrue(!ig3C.active());
-
-       checkExceptionTryUseCache(ig1B);
-       checkExceptionTryUseCache(ig2B);
-       checkExceptionTryUseCache(ig3B);
-
-       checkExceptionTryUseCache(ig1C);
-       checkExceptionTryUseCache(ig2C);
-       checkExceptionTryUseCache(ig3C);
-    }
-
-    /**
-     * @param ig Ig.
-     */
-    private void checkExceptionTryUseCache(final Ignite ig) {
-        assertThrows(log, new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                IgniteCache cache = ig.cache("cache");
-                return null;
-            }
-        }, IgniteException.class, "can not perform operation, because cluster inactive");
-    }
-
-    /**
-     *
-     */
-    public void testTryUseServiceInActiveCluster() throws Exception {
-        Ignite ig1B = backUp(0);
-        Ignite ig2B = backUp(1);
-        Ignite ig3B = backUp(2);
-
-        Ignite ig1C = backUpClient(0);
-        Ignite ig2C = backUpClient(1);
-        Ignite ig3C = backUpClient(2);
-
-        assertTrue(!ig1B.active());
-        assertTrue(!ig2B.active());
-        assertTrue(!ig3B.active());
-
-        assertTrue(!ig1C.active());
-        assertTrue(!ig2C.active());
-        assertTrue(!ig3C.active());
-
-        checkExceptionTryUseService(ig1B);
-        checkExceptionTryUseService(ig2B);
-        checkExceptionTryUseService(ig3B);
-
-        checkExceptionTryUseService(ig1C);
-        checkExceptionTryUseService(ig2C);
-        checkExceptionTryUseService(ig3C);
-    }
-
-    /**
-     *
-     */
-    private void checkExceptionTryUseService(final Ignite ig) {
-        assertThrows(log, new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                IgniteServices srvs = ig.services();
-
-                return null;
-            }
-        }, IgniteException.class, "can not perform operation, because cluster inactive");
-    }
-
-    /**
-     *
-     */
-    public void testTryUseDataStructureInActiveCluster() throws Exception {
-        Ignite ig1B = backUp(0);
-        Ignite ig2B = backUp(1);
-        Ignite ig3B = backUp(2);
-
-        Ignite ig1C = backUpClient(0);
-        Ignite ig2C = backUpClient(1);
-        Ignite ig3C = backUpClient(2);
-
-        assertTrue(!ig1B.active());
-        assertTrue(!ig2B.active());
-        assertTrue(!ig3B.active());
-
-        assertTrue(!ig1C.active());
-        assertTrue(!ig2C.active());
-        assertTrue(!ig3C.active());
-
-        checkExceptionTryUseDataStructure(ig1B);
-        checkExceptionTryUseDataStructure(ig2B);
-        checkExceptionTryUseDataStructure(ig3B);
-
-        checkExceptionTryUseDataStructure(ig1C);
-        checkExceptionTryUseDataStructure(ig2C);
-        checkExceptionTryUseDataStructure(ig3C);
-    }
-
-    /**
-     *
-     */
-    private void checkExceptionTryUseDataStructure(final Ignite ig){
-        assertThrows(log, new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                IgniteAtomicSequence seq = ig.atomicSequence("seq", 0, true);
-                return null;
-            }
-        }, IgniteException.class, "can not perform operation, because cluster inactive");
-    }
-
-    /**
-     *
-     */
-    public void testFailGetLock() throws Exception {
-        Ignite ig1P = primary(0);
-        Ignite ig2P = primary(1);
-        Ignite ig3P = primary(2);
-
-        Ignite ig1B = backUp(0);
-        Ignite ig2B = backUp(1);
-        Ignite ig3B = backUp(2);
-
-        Ignite ig1C = backUpClient(0);
-        Ignite ig2C = backUpClient(1);
-
-        final Ignite ig3C = backUpClient(2);
-
-        assertTrue(ig1P.active());
-        assertTrue(ig2P.active());
-        assertTrue(ig3P.active());
-
-        assertTrue(!ig1B.active());
-        assertTrue(!ig2B.active());
-        assertTrue(!ig3B.active());
-
-        assertTrue(!ig1C.active());
-        assertTrue(!ig2C.active());
-        assertTrue(!ig3C.active());
-
-        stopPrimary(0);
-
-        boolean exc = false;
-
-        try {
-            ig3C.active(true);
-        }
-        catch (IgniteException e) {
-            exc = true;
-
-            log.error("stack trace from remote node", e);
-
-            for (Throwable t : e.getSuppressed())
-                assertTrue(t.getMessage().contains("can't get lock during"));
-        }
-
-        if (!exc)
-            fail();
-
-        assertTrue(!ig1B.active());
-        assertTrue(!ig2B.active());
-        assertTrue(!ig3B.active());
-
-        assertTrue(!ig1C.active());
-        assertTrue(!ig2C.active());
-        assertTrue(!ig3C.active());
-    }
-
-    /**
-     *
-     */
-    public void testActivateAfterFailGetLock() throws Exception {
-        Ignite ig1P = primary(0);
-        Ignite ig2P = primary(1);
-        Ignite ig3P = primary(2);
-
-        Ignite ig1CP = primaryClient(0);
-        Ignite ig2CP = primaryClient(1);
-        Ignite ig3CP = primaryClient(2);
-
-        Ignite ig1B = backUp(0);
-        Ignite ig2B = backUp(1);
-        Ignite ig3B = backUp(2);
-
-        Ignite ig1CB = backUpClient(0);
-        Ignite ig2CB = backUpClient(1);
-        Ignite ig3CB = backUpClient(2);
-
-        assertTrue(ig1P.active());
-        assertTrue(ig2P.active());
-        assertTrue(ig3P.active());
-
-        assertTrue(!ig1B.active());
-        assertTrue(!ig2B.active());
-        assertTrue(!ig3B.active());
-
-        assertTrue(!ig1CB.active());
-        assertTrue(!ig2CB.active());
-        assertTrue(!ig3CB.active());
-
-        stopPrimary(0);
-
-        boolean exc = false;
-
-        try {
-            ig3CB.active(true);
-        }
-        catch (IgniteException e) {
-            exc = true;
-
-            log.error("stack trace from remote node", e);
-
-            for (Throwable t : e.getSuppressed())
-                assertTrue(t.getMessage().contains("can't get lock during"));
-        }
-
-        if (!exc)
-            fail();
-
-        assertTrue(!ig1B.active());
-        assertTrue(!ig2B.active());
-        assertTrue(!ig3B.active());
-
-        assertTrue(!ig1CB.active());
-        assertTrue(!ig2CB.active());
-        assertTrue(!ig3CB.active());
-
-        assertTrue(ig2P.active());
-        assertTrue(ig3P.active());
-
-        assertTrue(ig1CP.active());
-        assertTrue(ig2CP.active());
-        assertTrue(ig3CP.active());
-
-        stopAllPrimary();
-
-        ig2CB.active(true);
-
-        assertTrue(ig1B.active());
-        assertTrue(ig2B.active());
-        assertTrue(ig3B.active());
-
-        assertTrue(ig1CB.active());
-        assertTrue(ig2CB.active());
-        assertTrue(ig3CB.active());
-    }
-
-    /**
-     * @throws Exception if fail.
-     */
-    public void testDeActivateFromServerNode() throws Exception {
-        Ignite ig1 = primary(0);
-        Ignite ig2 = primary(1);
-        Ignite ig3 = primary(2);
-
-        assertTrue(ig1.active());
-        assertTrue(ig2.active());
-        assertTrue(ig3.active());
-
-        ig1.active(false);
-
-        assertTrue(!ig1.active());
-        assertTrue(!ig2.active());
-        assertTrue(!ig3.active());
-    }
-
-    /**
-     * @throws Exception if fail.
-     */
-    public void testDeActivateFromClientNode() throws Exception {
-        Ignite ig1 = primary(0);
-        Ignite ig2 = primary(1);
-        Ignite ig3 = primary(2);
-
-        Ignite ig1C = primaryClient(0);
-        Ignite ig2C = primaryClient(1);
-        Ignite ig3C = primaryClient(2);
-
-        assertTrue(ig1.active());
-        assertTrue(ig2.active());
-        assertTrue(ig3.active());
-
-        ig1C.active(false);
-
-        assertTrue(!ig1.active());
-        assertTrue(!ig2.active());
-        assertTrue(!ig3.active());
-
-        assertTrue(!ig1C.active());
-        assertTrue(!ig2C.active());
-        assertTrue(!ig3C.active());
-    }
-
-    /**
-     * @throws Exception if fail.
-     */
-    public void testDeActivateCheckCacheDestroy() throws Exception {
-        String chName = "myCache";
-
-        Ignite ig1 = primary(0);
-        Ignite ig2 = primary(1);
-        Ignite ig3 = primary(2);
-
-        ig1.getOrCreateCache(chName);
-
-        assertTrue(ig1.active());
-        assertTrue(ig2.active());
-        assertTrue(ig3.active());
-
-        ig1.active(false);
-
-        assertTrue(!ig1.active());
-        assertTrue(!ig2.active());
-        assertTrue(!ig3.active());
-
-        IgniteEx ex = (IgniteEx)ig1;
-
-        GridCacheProcessor cache = ex.context().cache();
-
-        assertTrue(F.isEmpty(cache.jcaches()));
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6bf5ce46/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteStandByClusterTest.java
----------------------------------------------------------------------
diff --git a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteStandByClusterTest.java b/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteStandByClusterTest.java
deleted file mode 100644
index b248208..0000000
--- a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/IgniteStandByClusterTest.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.database.standbycluster;
-
-import java.util.Arrays;
-import java.util.Map;
-import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.PersistentStoreConfiguration;
-import org.apache.ignite.internal.IgniteEx;
-import org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor;
-import org.apache.ignite.internal.processors.cache.GridCacheAdapter;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lang.IgnitePredicate;
-import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-import org.junit.Assert;
-
-/**
- *
- */
-public class IgniteStandByClusterTest extends GridCommonAbstractTest {
-    private static final TcpDiscoveryIpFinder vmIpFinder = new TcpDiscoveryVmIpFinder(true);
-
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
-        cfg.setDiscoverySpi(new TcpDiscoverySpi().setIpFinder(vmIpFinder));
-        cfg.setPersistentStoreConfiguration(new PersistentStoreConfiguration());
-        cfg.setConsistentId(igniteInstanceName);
-
-        return cfg;
-    }
-
-    public void testNotStartDynamicCachesOnClientAfterActivation() throws Exception {
-        final String cacheName0 = "cache0";
-        final String cacheName = "cache";
-
-        IgniteConfiguration cfg1 = getConfiguration("serv1");
-        IgniteConfiguration cfg2 = getConfiguration("serv2");
-
-        IgniteConfiguration cfg3 = getConfiguration("client");
-        cfg3.setCacheConfiguration(new CacheConfiguration(cacheName0));
-
-        cfg3.setClientMode(true);
-
-        IgniteEx ig1 = startGrid(cfg1);
-        IgniteEx ig2 = startGrid(cfg2);
-        IgniteEx ig3 = startGrid(cfg3);
-
-        assertTrue(!ig1.active());
-        assertTrue(!ig2.active());
-        assertTrue(!ig3.active());
-
-        ig3.active(true);
-
-        assertTrue(ig1.active());
-        assertTrue(ig2.active());
-        assertTrue(ig3.active());
-
-        ig3.createCache(new CacheConfiguration<>(cacheName));
-
-        assertNotNull(ig3.cache(cacheName));
-        assertNotNull(ig1.cache(cacheName));
-        assertNotNull(ig2.cache(cacheName));
-
-        assertNotNull(ig1.cache(cacheName0));
-        assertNotNull(ig3.cache(cacheName0));
-        assertNotNull(ig2.cache(cacheName0));
-
-        ig3.active(false);
-
-        assertTrue(!ig1.active());
-        assertTrue(!ig2.active());
-        assertTrue(!ig3.active());
-
-        ig3.active(true);
-
-        assertTrue(ig1.active());
-        assertTrue(ig2.active());
-        assertTrue(ig3.active());
-
-        assertNotNull(ig1.cache(cacheName));
-        assertNotNull(ig2.cache(cacheName));
-
-        Map<String, GridCacheAdapter<?, ?>> caches = U.field(ig3.context().cache(), "caches");
-
-        // Only system caches and cache0
-        assertTrue(caches.size() == 3);
-
-        assertNull(caches.get(cacheName));
-
-        assertNotNull(caches.get(cacheName0));
-
-        assertNotNull(ig3.cache(cacheName));
-    }
-
-    public void testStaticCacheStartAfterActivationWithCacheFilter() throws Exception {
-        String cache1 = "cache1";
-        String cache2 = "cache2";
-        String cache3 = "cache3";
-
-        IgniteConfiguration cfg1 = getConfiguration("node1");
-
-        cfg1.setCacheConfiguration(
-            new CacheConfiguration(cache1).setNodeFilter(new NodeFilterIgnoreByName("node2")));
-
-        IgniteConfiguration cfg2 = getConfiguration("node2");
-
-        cfg2.setCacheConfiguration(
-            new CacheConfiguration(cache2).setNodeFilter(new NodeFilterIgnoreByName("node3")));
-
-        IgniteConfiguration cfg3 = getConfiguration("node3");
-
-        cfg3.setCacheConfiguration(
-            new CacheConfiguration(cache3).setNodeFilter(new NodeFilterIgnoreByName("node1")));
-
-        IgniteEx ig1 = startGrid(cfg1);
-        IgniteEx ig2 = startGrid(cfg2);
-        IgniteEx ig3 = startGrid(cfg3);
-
-        assertTrue(!ig1.active());
-        assertTrue(!ig2.active());
-        assertTrue(!ig3.active());
-
-        for (IgniteEx ig: Arrays.asList(ig1,ig2,ig3)){
-            Map<String, DynamicCacheDescriptor> desc = U.field(U.field(ig.context().cache(), "cachesInfo"), "registeredCaches");
-
-            assertEquals(0, desc.size());
-        }
-
-        ig3.active(true);
-
-        assertTrue(ig1.active());
-        assertTrue(ig2.active());
-        assertTrue(ig3.active());
-
-        for (IgniteEx ig: Arrays.asList(ig1,ig2,ig3)){
-            Map<String, DynamicCacheDescriptor> desc = U.field(
-                U.field(ig.context().cache(), "cachesInfo"), "registeredCaches");
-
-            assertEquals(5, desc.size());
-
-            Map<String, GridCacheAdapter<?, ?>> caches = U.field(ig.context().cache(), "caches");
-
-            assertEquals(4, caches.keySet().size());
-        }
-
-        Map<String, GridCacheAdapter<?, ?>> caches1 = U.field(ig1.context().cache(), "caches");
-
-        Assert.assertNotNull(caches1.get(cache1));
-        Assert.assertNotNull(caches1.get(cache2));
-        Assert.assertNull(caches1.get(cache3));
-
-        Map<String, GridCacheAdapter<?, ?>> caches2 = U.field(ig2.context().cache(), "caches");
-
-        Assert.assertNull(caches2.get(cache1));
-        Assert.assertNotNull(caches2.get(cache2));
-        Assert.assertNotNull(caches2.get(cache3));
-
-        Map<String, GridCacheAdapter<?, ?>> caches3 = U.field(ig3.context().cache(), "caches");
-
-        Assert.assertNotNull(caches3.get(cache1));
-        Assert.assertNull(caches3.get(cache2));
-        Assert.assertNotNull(caches3.get(cache3));
-    }
-
-    private static class NodeFilterIgnoreByName implements IgnitePredicate<ClusterNode>{
-        private final String name;
-
-        private NodeFilterIgnoreByName(String name) {
-            this.name = name;
-        }
-
-        @Override public boolean apply(ClusterNode node) {
-            return !name.equals(node.consistentId());
-        }
-    }
-
-    @Override protected void beforeTest() throws Exception {
-        super.beforeTest();
-
-        stopAllGrids();
-
-        deleteRecursively(U.resolveWorkDirectory(U.defaultWorkDirectory(), "db", true));
-    }
-
-    @Override protected void afterTest() throws Exception {
-        super.beforeTest();
-
-        stopAllGrids();
-
-        deleteRecursively(U.resolveWorkDirectory(U.defaultWorkDirectory(), "db", true));
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6bf5ce46/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivateExtensionTest.java
----------------------------------------------------------------------
diff --git a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivateExtensionTest.java b/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivateExtensionTest.java
deleted file mode 100644
index 1baf4a5..0000000
--- a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivateExtensionTest.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.database.standbycluster.extended;
-
-import java.lang.reflect.Method;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.MemoryConfiguration;
-import org.apache.ignite.configuration.MemoryPolicyConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.configuration.PersistentStoreConfiguration;
-import org.apache.ignite.internal.IgniteEx;
-import org.apache.ignite.internal.processors.cache.GridCacheAbstractFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearOnlyMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.resource.GridSpringResourceContext;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
-
-/**
- *
- */
-public class GridActivateExtensionTest extends GridCacheAbstractFullApiSelfTest {
-    /** Condition id. */
-    private int condId;
-
-    /** Primary ip finder. */
-    private TcpDiscoveryIpFinder primaryIpFinder = new TcpDiscoveryVmIpFinder(true);
-
-    /** Back up ip finder. */
-    private TcpDiscoveryIpFinder backUpIpFinder = new TcpDiscoveryVmIpFinder(true);
-
-    /** Back up cluster. */
-    private static Map<String, String> backUpCluster = new LinkedHashMap<>();
-
-    /** Test name. */
-    private final String testName = testName();
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(gridName);
-
-        cfg.setConsistentId("ConsId" + (condId++));
-        ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(primaryIpFinder);
-
-        PersistentStoreConfiguration pCfg = new PersistentStoreConfiguration();
-
-        pCfg.setPersistentStorePath(testName + "/db");
-        pCfg.setWalArchivePath(testName + "/db/wal/archive");
-        pCfg.setWalStorePath(testName + "/db/wal");
-
-        cfg.setPersistentStoreConfiguration(pCfg);
-
-        final MemoryConfiguration memCfg = new MemoryConfiguration();
-
-        MemoryPolicyConfiguration memPlcCfg = new MemoryPolicyConfiguration();
-
-        memPlcCfg.setInitialSize(5 * 1024 * 1024);
-        memPlcCfg.setMaxSize(5 * 1024 * 1024);
-
-        memPlcCfg.setName("dfltMemPlc");
-
-        memCfg.setMemoryPolicies(memPlcCfg);
-
-        memCfg.setDefaultMemoryPolicyName(memPlcCfg.getName());
-
-        memCfg.setPageSize(1024);
-        memCfg.setConcurrencyLevel(64);
-
-        cfg.setMemoryConfiguration(memCfg);
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        deleteRecursively(U.resolveWorkDirectory(U.defaultWorkDirectory(), testName, true));
-
-        super.beforeTestsStarted();
-
-        if (onlyClient())
-            return;
-
-        int nodes = gridCount();
-
-        if (nodes != condId)
-            fail("checking fail");
-
-        condId = 0;
-
-        log.info("start backup cluster");
-
-        for (String name: backUpCluster.keySet()){
-            String n = name + "backUp";
-
-            IgniteConfiguration cfg = getConfiguration(n);
-            cfg.setActiveOnStart(false);
-            ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(backUpIpFinder);
-
-            startGrid(n, cfg);
-
-            backUpCluster.put(name, n);
-        }
-
-        log.info("shutdown main cluster");
-
-        for (String name : backUpCluster.keySet()){
-            log.info(name + " stopping");
-
-            stopGrid(name);
-        }
-
-        Ignite ig = grid(0);
-
-        ig.active(true);
-
-        log.info("activate backUp cluster");
-
-        assertEquals(true, ig.active());
-
-        Class c = getClass();
-
-        if (isNearTest(c)) {
-            for (int i = 0; i < gridCount(); i++) {
-                if (ignite(i).configuration().isClientMode()) {
-                    Method m = getClientHasNearCacheMethod();
-
-                    Boolean r = (Boolean)m.invoke(this);
-
-                    if (r != null && r)
-                        ignite(i).createNearCache(null, new NearCacheConfiguration<>());
-                    else
-                        ignite(i).cache(null);
-
-                    break;
-                }
-            }
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-
-        stopAllGrids();
-
-        backUpCluster.clear();
-
-        condId = 0;
-
-        deleteRecursively(U.resolveWorkDirectory(U.defaultWorkDirectory(), testName, true));
-    }
-
-    /** {@inheritDoc} */
-    @Override protected Ignite startGrid(String gridName, GridSpringResourceContext ctx) throws Exception {
-        if (!gridName.contains("backUp"))
-            backUpCluster.put(gridName, gridName);
-
-        return super.startGrid(gridName, ctx);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected IgniteEx grid(String name) {
-        String n = name;
-
-        if (backUpCluster.containsKey(name))
-            n = backUpCluster.get(name);
-
-        return super.grid(n);
-    }
-
-    /**
-     *
-     */
-    public boolean onlyClient(){
-        for (int i = 0; i < gridCount(); i++)
-            if (!grid(i).configuration().isClientMode())
-                return false;
-
-        return true;
-    }
-
-    /**
-     * @param c class.
-     */
-    private boolean isNearTest(Class c) {
-        Class p = c.getSuperclass();
-
-        while (!p.equals(Object.class)) {
-            if (p.equals(GridCacheNearOnlyMultiNodeFullApiSelfTest.class))
-                return true;
-
-            p = p.getSuperclass();
-        }
-
-        return false;
-    }
-
-    /**
-     *
-     */
-    public Method getClientHasNearCacheMethod() throws NoSuchMethodException {
-        Class p = getClass().getSuperclass();
-
-        while (!p.equals(Object.class)) {
-            if (p.equals(GridCacheNearOnlyMultiNodeFullApiSelfTest.class))
-                return p.getDeclaredMethod("clientHasNearCache");
-
-            p = p.getSuperclass();
-        }
-
-        return null;
-    }
-
-    /**
-     *
-     */
-    protected String testName() {
-        return getClass().getSimpleName();
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6bf5ce46/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationAtomicCacheSuit.java
----------------------------------------------------------------------
diff --git a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationAtomicCacheSuit.java b/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationAtomicCacheSuit.java
deleted file mode 100644
index 397d8d0..0000000
--- a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationAtomicCacheSuit.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.database.standbycluster.extended;
-
-import junit.framework.TestSuite;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicNearEnabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicClientOnlyMultiNodeP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicCopyOnReadDisabledMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicMultiNodeP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearEnabledMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearOnlyMultiNodeP2PDisabledFullApiSelfTest;
-
-/**
- *
- */
-public class GridActivationAtomicCacheSuit extends GridActivationCacheAbstractTestSuit {
-    static {
-        addTest(GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.class);
-        addTest(GridCacheAtomicClientOnlyMultiNodeP2PDisabledFullApiSelfTest.class);
-        addTest(GridCacheAtomicCopyOnReadDisabledMultiNodeFullApiSelfTest.class);
-        addTest(GridCacheAtomicFullApiSelfTest.class);
-        addTest(GridCacheAtomicMultiNodeFullApiSelfTest.class);
-        addTest(GridCacheAtomicMultiNodeP2PDisabledFullApiSelfTest.class);
-        addTest(GridCacheAtomicNearEnabledFullApiSelfTest.class);
-        addTest(GridCacheAtomicNearEnabledMultiNodeFullApiSelfTest.class);
-        addTest(GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.class);
-        addTest(GridCacheAtomicNearOnlyMultiNodeP2PDisabledFullApiSelfTest.class);
-
-//        addTest(GridCacheAtomicClientOnlyFairAffinityMultiJvmFullApiSelfTest.class));
-//        addTest(GridCacheAtomicClientOnlyMultiJvmFullApiSelfTest.class));
-//        addTest(GridCacheAtomicClientOnlyMultiJvmP2PDisabledFullApiSelfTest.class));
-//        addTest(GridCacheAtomicCopyOnReadDisabledMultiJvmFullApiSelfTest.class));
-//        addTest(GridCacheAtomicFairAffinityMultiJvmFullApiSelfTest.class));
-//        addTest(GridCacheAtomicMultiJvmFullApiSelfTest.class));
-//        addTest(GridCacheAtomicMultiJvmP2PDisabledFullApiSelfTest.class));
-//        addTest(GridCacheAtomicOffHeapMultiJvmFullApiSelfTest.class));
-//        addTest(GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest.class));
-//        addTest(GridCacheAtomicPrimaryWriteOrderFairAffinityMultiJvmFullApiSelfTest.class));
-//        addTest(GridCacheAtomicPrimaryWriteOrderMultiJvmFullApiSelfTest.class));
-//        addTest(GridCacheAtomicPrimaryWriteOrderMultiJvmP2PDisabledFullApiSelfTest.class));
-//        addTest(GridCacheAtomicPrimaryWrityOrderOffHeapMultiJvmFullApiSelfTest.class));
-//        addTest(GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiJvmFullApiSelfTest.class));
-//        addTest(GridCacheAtomicNearEnabledFairAffinityMultiJvmFullApiSelfTest.class));
-//        addTest(GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest.class));
-//        addTest(GridCacheAtomicNearEnabledPrimaryWriteOrderMultiJvmFullApiSelfTest.class));
-//        addTest(GridCacheAtomicNearOnlyMultiJvmFullApiSelfTest.class));
-//        addTest(GridCacheAtomicNearOnlyMultiJvmP2PDisabledFullApiSelfTest.class));
-    }
-
-    /**
-     *
-     */
-    public static TestSuite suite() {
-        TestSuite suite = buildSuite();
-
-        suite.setName("Activation Stand-by Cluster After Primary Cluster Stopped Check Atomic Cache");
-
-        return suite;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6bf5ce46/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationCacheAbstractTestSuit.java
----------------------------------------------------------------------
diff --git a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationCacheAbstractTestSuit.java b/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationCacheAbstractTestSuit.java
deleted file mode 100644
index 553546a..0000000
--- a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationCacheAbstractTestSuit.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.database.standbycluster.extended;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import javassist.CannotCompileException;
-import javassist.ClassClassPath;
-import javassist.ClassPool;
-import javassist.CtClass;
-import javassist.NotFoundException;
-import junit.framework.TestSuite;
-import org.apache.ignite.IgniteException;
-
-/**
- *
- */
-public abstract class GridActivationCacheAbstractTestSuit {
-    /** Tests. */
-    private static final List<Class> tests = new ArrayList<>();
-
-    /** Suffix. */
-    private static final String SUFFIX = "Ex";
-
-    /**
-     * @return Suite.
-     */
-    protected static TestSuite buildSuite() {
-        TestSuite suite = new TestSuite();
-
-        for (Class c : tests)
-            suite.addTestSuite(c);
-
-        return suite;
-    }
-
-    /**
-     * @param c Class.
-     */
-    protected static void addTest(Class c){
-        tests.add(transform(c));
-    }
-
-
-    /**
-     * @param c Class to transform.
-     * @return Transformed class.
-     */
-    private static Class transform(Class c){
-        try {
-            ClassPool pool = ClassPool.getDefault();
-
-            pool.insertClassPath(new ClassClassPath(GridActivationCacheAbstractTestSuit.class));
-
-            String path = c.getProtectionDomain().getCodeSource().getLocation().getPath();
-
-            CtClass ct = pool.get(c.getName());
-
-            String name = c.getName() + SUFFIX;
-
-            CtClass pr = pool.get(GridActivateExtensionTest.class.getName());
-
-            pr.setName(name);
-
-            pr.setSuperclass(ct);
-
-            pr.writeFile(path);
-
-            return Class.forName(name);
-        }
-        catch (IOException e) {
-            System.out.println("Io exception: " + e.getMessage());
-
-            throw new IgniteException(e);
-        }
-        catch (CannotCompileException e) {
-            System.out.println("Cannot compile exception: " + e.getMessage());
-
-            throw new IgniteException(e);
-        }
-        catch (NotFoundException e) {
-            System.out.println("Not found exception: " + e.getMessage());
-
-            throw new IgniteException(e);
-        }
-        catch (ClassNotFoundException e) {
-            System.out.println("Class not found exception: " + e.getMessage());
-
-            throw new IgniteException(e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6bf5ce46/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationLocalAndNearCacheSuit.java
----------------------------------------------------------------------
diff --git a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationLocalAndNearCacheSuit.java b/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationLocalAndNearCacheSuit.java
deleted file mode 100644
index b6ef49c..0000000
--- a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationLocalAndNearCacheSuit.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.database.standbycluster.extended;
-
-import junit.framework.TestSuite;
-import org.apache.ignite.internal.processors.cache.local.GridCacheLocalAtomicFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.local.GridCacheLocalFullApiSelfTest;
-
-/**
- *
- */
-public class GridActivationLocalAndNearCacheSuit extends GridActivationCacheAbstractTestSuit {
-    static {
-        addTest(GridCacheLocalAtomicFullApiSelfTest.class);
-        addTest(GridCacheLocalFullApiSelfTest.class);
-
-//        addTest(GridCacheNearOnlyFairAffinityMultiJvmFullApiSelfTest.class);
-//        addTest(GridCacheNearOnlyMultiJvmFullApiSelfTest.class);
-//        addTest(GridCacheNearOnlyMultiJvmP2PDisabledFullApiSelfTest.class);
-    }
-
-    /**
-     *
-     */
-    public static TestSuite suite() {
-        TestSuite suite = buildSuite();
-
-        suite.setName("Activation Stand-by Cluster After Primary Cluster Stopped Check Local and Near Cache");
-
-        return suite;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6bf5ce46/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationPartitionedCacheSuit.java
----------------------------------------------------------------------
diff --git a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationPartitionedCacheSuit.java b/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationPartitionedCacheSuit.java
deleted file mode 100644
index fc437ad..0000000
--- a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationPartitionedCacheSuit.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.database.standbycluster.extended;
-
-import junit.framework.TestSuite;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledMultiNodeP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.CachePartitionedMultiNodeLongTxTimeoutFullApiTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.CachePartitionedNearEnabledMultiNodeLongTxTimeoutFullApiTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearOnlyMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearOnlyMultiNodeP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedCopyOnReadDisabledMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedLateAffDisabledMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedMultiNodeP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedNearOnlyNoPrimaryFullApiSelfTest;
-
-/**
- *
- */
-public class GridActivationPartitionedCacheSuit extends GridActivationCacheAbstractTestSuit {
-    static {
-        addTest(CachePartitionedMultiNodeLongTxTimeoutFullApiTest.class);
-        addTest(CachePartitionedNearEnabledMultiNodeLongTxTimeoutFullApiTest.class);
-        addTest(GridCacheNearOnlyMultiNodeFullApiSelfTest.class);
-        addTest(GridCacheNearOnlyMultiNodeP2PDisabledFullApiSelfTest.class);
-        addTest(GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.class);
-        addTest(GridCachePartitionedCopyOnReadDisabledMultiNodeFullApiSelfTest.class);
-        addTest(GridCachePartitionedFullApiSelfTest.class);
-        addTest(GridCachePartitionedLateAffDisabledMultiNodeFullApiSelfTest.class);
-        addTest(GridCachePartitionedMultiNodeFullApiSelfTest.class);
-        addTest(GridCachePartitionedMultiNodeP2PDisabledFullApiSelfTest.class);
-        addTest(GridCachePartitionedNearDisabledFullApiSelfTest.class);
-        addTest(GridCachePartitionedNearDisabledMultiNodeFullApiSelfTest.class);
-        addTest(GridCachePartitionedNearDisabledMultiNodeP2PDisabledFullApiSelfTest.class);
-        addTest(GridCachePartitionedNearOnlyNoPrimaryFullApiSelfTest.class);
-
-//        addTest(GridCachePartitionedMultiJvmFullApiSelfTest.class);
-//        addTest(GridCachePartitionedCopyOnReadDisabledMultiJvmFullApiSelfTest.class);
-//        addTest(GridCachePartitionedFairAffinityMultiJvmFullApiSelfTest.class);
-//        addTest(GridCachePartitionedMultiJvmP2PDisabledFullApiSelfTest.class);
-//        addTest(GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiJvmFullApiSelfTest.class);
-//        addTest(GridCachePartitionedNearDisabledFairAffinityMultiJvmFullApiSelfTest.class);
-//        addTest(GridCachePartitionedNearDisabledMultiJvmFullApiSelfTest.class);
-//        addTest(GridCachePartitionedNearDisabledMultiJvmP2PDisabledFullApiSelfTest.class);
-//        addTest(GridCachePartitionedNearDisabledOffHeapMultiJvmFullApiSelfTest.class);
-//        addTest(GridCachePartitionedNearDisabledOffHeapTieredMultiJvmFullApiSelfTest.class);
-//        addTest(GridCachePartitionedOffHeapMultiJvmFullApiSelfTest.class);
-//        addTest(GridCachePartitionedOffHeapTieredMultiJvmFullApiSelfTest.class);
-    }
-
-    /**
-     *
-     */
-    public static TestSuite suite() {
-        TestSuite suite = buildSuite();
-
-        suite.setName("Activation Stand-by Cluster After Primary Cluster Stopped Check Partitioned Cache");
-
-        return suite;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/6bf5ce46/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationReplicatedCacheSuit.java
----------------------------------------------------------------------
diff --git a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationReplicatedCacheSuit.java b/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationReplicatedCacheSuit.java
deleted file mode 100644
index 6cdc87b..0000000
--- a/modules/pds/src/test/java/org/apache/ignite/cache/database/standbycluster/extended/GridActivationReplicatedCacheSuit.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.cache.database.standbycluster.extended;
-
-import junit.framework.TestSuite;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.CacheReplicatedRendezvousAffinityExcludeNeighborsMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.CacheReplicatedRendezvousAffinityMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedAtomicFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedAtomicMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedMultiNodeP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedNearOnlyMultiNodeFullApiSelfTest;
-
-/**
- *
- */
-public class GridActivationReplicatedCacheSuit extends GridActivationCacheAbstractTestSuit {
-    static {
-        addTest(CacheReplicatedRendezvousAffinityExcludeNeighborsMultiNodeFullApiSelfTest.class);
-        addTest(CacheReplicatedRendezvousAffinityMultiNodeFullApiSelfTest.class);
-        addTest(GridCacheReplicatedAtomicFullApiSelfTest.class);
-        addTest(GridCacheReplicatedFullApiSelfTest.class);
-        addTest(GridCacheReplicatedMultiNodeFullApiSelfTest.class);
-        addTest(GridCacheReplicatedAtomicMultiNodeFullApiSelfTest.class);
-        addTest(GridCacheReplicatedMultiNodeP2PDisabledFullApiSelfTest.class);
-        addTest(GridCacheReplicatedNearOnlyMultiNodeFullApiSelfTest.class);
-
-//        tests.add(transform(GridCacheReplicatedAtomicMultiJvmFullApiSelfTest.class));
-//        tests.add(transform(GridCacheReplicatedAtomicPrimaryWriteOrderMultiJvmFullApiSelfTest.class));
-//        tests.add(transform(GridCacheReplicatedMultiJvmFullApiSelfTest.class));
-//        tests.add(transform(GridCacheReplicatedMultiJvmP2PDisabledFullApiSelfTest.class));
-//        tests.add(transform(GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest.class));
-//        tests.add(transform(GridCacheReplicatedOffHeapMultiJvmFullApiSelfTest.class));
-//        tests.add(transform(GridCacheReplicatedOffHeapTieredMultiJvmFullApiSelfTest.class));
-    }
-
-    /**
-     *
-     */
-    public static TestSuite suite() {
-        TestSuite suite = buildSuite();
-
-        suite.setName("Activation Stand-by Cluster After Primary Cluster Stopped  Check Replicated Cache");
-
-        return suite;
-    }
-}


Mime
View raw message