ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [16/18] ignite git commit: IGNITE-3965 @GridInternal tasks should run via standart LoadBalancingSpi. Added test.
Date Wed, 28 Sep 2016 02:26:56 GMT
IGNITE-3965 @GridInternal tasks should run via standart LoadBalancingSpi. Added test.


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

Branch: refs/heads/master
Commit: 89c30c8b0be6915d2399be508ddcd9eb439a9aaa
Parents: c188c3c
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Wed Sep 28 08:57:45 2016 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Wed Sep 28 08:57:45 2016 +0700

----------------------------------------------------------------------
 .../apache/ignite/compute/ComputeTaskSpis.java  |   8 +-
 .../ignite/internal/GridTaskSessionImpl.java    |  15 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |  22 ++
 .../loadbalancer/GridLoadBalancerManager.java   |  10 +-
 .../processors/job/GridJobProcessor.java        |   3 +-
 .../session/GridTaskSessionProcessor.java       |   9 +-
 .../processors/task/GridTaskProcessor.java      |   3 +-
 .../processors/task/GridTaskWorker.java         |   2 +-
 .../GridInternalTasksLoadBalancingSelfTest.java | 201 +++++++++++++++++++
 .../IgniteSpiLoadBalancingSelfTestSuite.java    |  34 ++--
 10 files changed, 279 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/89c30c8b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSpis.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSpis.java b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSpis.java
index 5edd464..0b6e425 100644
--- a/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSpis.java
+++ b/modules/core/src/main/java/org/apache/ignite/compute/ComputeTaskSpis.java
@@ -38,22 +38,22 @@ import java.lang.annotation.Target;
 public @interface ComputeTaskSpis {
     /**
      * Optional load balancing SPI name. By default, SPI name is equal
-     * to the name of the SPI class. You can change SPI name by explicitely
+     * to the name of the SPI class. You can change SPI name by explicitly
      * supplying {@link org.apache.ignite.spi.IgniteSpi#getName()} parameter in grid configuration.
      */
     public String loadBalancingSpi() default "";
 
     /**
      * Optional failover SPI name. By default, SPI name is equal
-     * to the name of the SPI class. You can change SPI name by explicitely
+     * to the name of the SPI class. You can change SPI name by explicitly
      * supplying {@link org.apache.ignite.spi.IgniteSpi#getName()} parameter in grid configuration.
      */
     public String failoverSpi() default "";
 
     /**
      * Optional checkpoint SPI name. By default, SPI name is equal
-     * to the name of the SPI class. You can change SPI name by explicitely
+     * to the name of the SPI class. You can change SPI name by explicitly
      * supplying {@link org.apache.ignite.spi.IgniteSpi#getName()} parameter in grid configuration.
      */
     public String checkpointSpi() default "";
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/89c30c8b/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
index bbe05b8..dd1caa1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridTaskSessionImpl.java
@@ -103,6 +103,9 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal {
     private final boolean fullSup;
 
     /** */
+    private final boolean internal;
+
+    /** */
     private final Collection<UUID> top;
 
     /** */
@@ -124,6 +127,7 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal {
      * @param attrs Session attributes.
      * @param ctx Grid Kernal Context.
      * @param fullSup Session full support enabled flag.
+     * @param internal Internal task flag.
      * @param subjId Subject ID.
      */
     public GridTaskSessionImpl(
@@ -139,6 +143,7 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal {
         @Nullable Map<Object, Object> attrs,
         GridKernalContext ctx,
         boolean fullSup,
+        boolean internal,
         UUID subjId) {
         assert taskNodeId != null;
         assert taskName != null;
@@ -166,6 +171,7 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal {
         }
 
         this.fullSup = fullSup;
+        this.internal = internal;
         this.subjId = subjId;
 
         mapFut = new IgniteFutureImpl(new GridFutureAdapter());
@@ -860,8 +866,15 @@ public class GridTaskSessionImpl implements GridTaskSessionInternal {
         return mapFut;
     }
 
+    /**
+     * @return {@code True} if task is internal.
+     */
+    public boolean isInternal() {
+        return internal;
+    }
+
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(GridTaskSessionImpl.class, this);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/89c30c8b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index b54c17d..4f64da2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -93,6 +93,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMultic
 import org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi;
 import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi;
 import org.apache.ignite.spi.indexing.noop.NoopIndexingSpi;
+import org.apache.ignite.spi.loadbalancing.LoadBalancingSpi;
 import org.apache.ignite.spi.loadbalancing.roundrobin.RoundRobinLoadBalancingSpi;
 import org.apache.ignite.spi.swapspace.file.FileSwapSpaceSpi;
 import org.apache.ignite.spi.swapspace.noop.NoopSwapSpaceSpi;
@@ -2052,6 +2053,27 @@ public class IgnitionEx {
 
             if (cfg.getLoadBalancingSpi() == null)
                 cfg.setLoadBalancingSpi(new RoundRobinLoadBalancingSpi());
+            else {
+                Collection<LoadBalancingSpi> spis = new ArrayList<>();
+
+                boolean dfltLoadBalancingSpi = false;
+
+                for (LoadBalancingSpi spi : cfg.getLoadBalancingSpi()) {
+                    spis.add(spi);
+
+                    if (spi instanceof RoundRobinLoadBalancingSpi) {
+                        dfltLoadBalancingSpi = true;
+
+                        break;
+                    }
+                }
+
+                // Add default load balancing SPI for internal tasks.
+                if (!dfltLoadBalancingSpi)
+                    spis.add(new RoundRobinLoadBalancingSpi());
+
+                cfg.setLoadBalancingSpi(spis.toArray(new LoadBalancingSpi[spis.size()]));
+            }
 
             if (cfg.getIndexingSpi() == null)
                 cfg.setIndexingSpi(new NoopIndexingSpi());

http://git-wip-us.apache.org/repos/asf/ignite/blob/89c30c8b/modules/core/src/main/java/org/apache/ignite/internal/managers/loadbalancer/GridLoadBalancerManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/loadbalancer/GridLoadBalancerManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/loadbalancer/GridLoadBalancerManager.java
index 631168b..15a4d2c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/loadbalancer/GridLoadBalancerManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/loadbalancer/GridLoadBalancerManager.java
@@ -30,6 +30,7 @@ import org.apache.ignite.internal.managers.GridManagerAdapter;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.A;
 import org.apache.ignite.spi.loadbalancing.LoadBalancingSpi;
+import org.apache.ignite.spi.loadbalancing.roundrobin.RoundRobinLoadBalancingSpi;
 import org.jetbrains.annotations.Nullable;
 
 /**
@@ -72,7 +73,12 @@ public class GridLoadBalancerManager extends GridManagerAdapter<LoadBalancingSpi
         assert top != null;
         assert job != null;
 
-        return getSpi(ses.getLoadBalancingSpi()).getBalancedNode(ses, top, job);
+        LoadBalancingSpi spi = getSpi(ses.getLoadBalancingSpi());
+
+        if (ses.isInternal() && !(spi instanceof RoundRobinLoadBalancingSpi))
+            return getSpi(RoundRobinLoadBalancingSpi.class.getSimpleName()).getBalancedNode(ses,
top, job);
+
+        return spi.getBalancedNode(ses, top, job);
     }
 
     /**
@@ -102,4 +108,4 @@ public class GridLoadBalancerManager extends GridManagerAdapter<LoadBalancingSpi
             }
         };
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/89c30c8b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java
index 6a162d3..563a3d8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java
@@ -1057,6 +1057,7 @@ public class GridJobProcessor extends GridProcessorAdapter {
                             siblings,
                             sesAttrs,
                             req.isSessionFullSupport(),
+                            req.isInternal(),
                             req.getSubjectId());
 
                         taskSes.setCheckpointSpi(req.getCheckpointSpi());
@@ -2034,4 +2035,4 @@ public class GridJobProcessor extends GridProcessorAdapter {
             return sizex();
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/89c30c8b/modules/core/src/main/java/org/apache/ignite/internal/processors/session/GridTaskSessionProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/session/GridTaskSessionProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/session/GridTaskSessionProcessor.java
index 2ac39c9..d660948 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/session/GridTaskSessionProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/session/GridTaskSessionProcessor.java
@@ -73,8 +73,8 @@ public class GridTaskSessionProcessor extends GridProcessorAdapter {
      * @param endTime Execution end time.
      * @param siblings Collection of siblings.
      * @param attrs Map of attributes.
-     * @param fullSup {@code True} to enable distributed session attributes
-     *      and checkpoints.
+     * @param fullSup {@code True} to enable distributed session attributes and checkpoints.
+     * @param internal {@code True} in case of internal task.
      * @param subjId Subject ID.
      * @return New session if one did not exist, or existing one.
      */
@@ -90,6 +90,7 @@ public class GridTaskSessionProcessor extends GridProcessorAdapter {
         Collection<ComputeJobSibling> siblings,
         Map<Object, Object> attrs,
         boolean fullSup,
+        boolean internal,
         UUID subjId) {
         if (!fullSup) {
             return new GridTaskSessionImpl(
@@ -105,6 +106,7 @@ public class GridTaskSessionProcessor extends GridProcessorAdapter {
                 attrs,
                 ctx,
                 false,
+                internal,
                 subjId);
         }
 
@@ -127,6 +129,7 @@ public class GridTaskSessionProcessor extends GridProcessorAdapter {
                         attrs,
                         ctx,
                         true,
+                        internal,
                         subjId));
 
                 if (old != null)
@@ -177,4 +180,4 @@ public class GridTaskSessionProcessor extends GridProcessorAdapter {
         X.println(">>> Task session processor memory stats [grid=" + ctx.gridName()
+ ']');
         X.println(">>>  sesMapSize: " + sesMap.size());
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/89c30c8b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
index f54277c..6d97229 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
@@ -621,6 +621,7 @@ public class GridTaskProcessor extends GridProcessorAdapter {
             Collections.<ComputeJobSibling>emptyList(),
             Collections.emptyMap(),
             fullSup,
+            dep != null && dep.internalTask(task, taskCls),
             subjId);
 
         ComputeTaskInternalFuture<R> fut = new ComputeTaskInternalFuture<>(ses,
ctx);
@@ -1367,4 +1368,4 @@ public class GridTaskProcessor extends GridProcessorAdapter {
             }
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/89c30c8b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
index 79d1a2c..452e48c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java
@@ -490,7 +490,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject
{
                 }
             }
 
-            internal = dep.internalTask(task, taskCls);
+            internal = ses.isInternal();
 
             recordTaskEvent(EVT_TASK_STARTED, "Task started.");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/89c30c8b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/internal/GridInternalTasksLoadBalancingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/internal/GridInternalTasksLoadBalancingSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/internal/GridInternalTasksLoadBalancingSelfTest.java
new file mode 100644
index 0000000..da1a4e5
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/spi/loadbalancing/internal/GridInternalTasksLoadBalancingSelfTest.java
@@ -0,0 +1,201 @@
+/*
+ * 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.spi.loadbalancing.internal;
+
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.compute.ComputeJob;
+import org.apache.ignite.compute.ComputeJobAdapter;
+import org.apache.ignite.compute.ComputeJobResult;
+import org.apache.ignite.compute.ComputeTaskSession;
+import org.apache.ignite.compute.ComputeTaskSplitAdapter;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.processors.task.GridInternal;
+import org.apache.ignite.internal.util.lang.GridTuple3;
+import org.apache.ignite.internal.visor.VisorTaskArgument;
+import org.apache.ignite.internal.visor.node.VisorNodePingTask;
+import org.apache.ignite.spi.IgniteSpiAdapter;
+import org.apache.ignite.spi.IgniteSpiException;
+import org.apache.ignite.spi.IgniteSpiMultipleInstancesSupport;
+import org.apache.ignite.spi.loadbalancing.LoadBalancingSpi;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.jetbrains.annotations.Nullable;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.UUID;
+
+/**
+ * Test that will start two nodes with custom load balancing SPI and execute {@link GridInternal}
task on it.
+ */
+public class GridInternalTasksLoadBalancingSelfTest extends GridCommonAbstractTest {
+    /** Grid count. */
+    private static final int GRID_CNT = 2;
+
+    /** Expected job result. */
+    private static final String JOB_RESULT = "EXPECTED JOB RESULT";
+
+    /** Expected task result. */
+    private static final String TASK_RESULT = JOB_RESULT + JOB_RESULT;
+
+    /** */
+    private static Ignite ignite;
+
+    /** If {@code true} then special custom load balancer SPI will be used. */
+    private static boolean customLoadBalancer = true;
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        stopAllGrids();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        if (customLoadBalancer)
+            cfg.setLoadBalancingSpi(new CustomLoadBalancerSpi());
+
+        return cfg;
+    }
+
+    /**
+     * This test execute internal tasks over grid with custom balancer.
+     *
+     * @throws Exception In case of error.
+     */
+    public void testInternalTaskBalancing() throws Exception {
+        customLoadBalancer = true;
+
+        ignite = startGrids(GRID_CNT);
+
+        // Task with GridInternal should pass.
+        assertEquals(TASK_RESULT, ignite.compute().execute(GridInternalTestTask.class.getName(),
null));
+
+        // Visor task should pass.
+        UUID nid = ignite.cluster().localNode().id();
+
+        GridTuple3<Boolean, Long, Long> ping = ignite.compute()
+            .execute(VisorNodePingTask.class.getName(), new VisorTaskArgument<>(nid,
nid, false));
+
+        assertTrue(ping.get1());
+
+        // Custom task should fail, because special test load balancer SPI returns null as
balanced node.
+        try {
+            ignite.compute().execute(CustomTestTask.class.getName(), null);
+        }
+        catch (IgniteException e) {
+            assertTrue(e.getMessage().startsWith("Node can not be null [mappedJob=org.apache.ignite.spi.loadbalancing.internal.GridInternalTasksLoadBalancingSelfTest$CustomTestJob"));
+        }
+    }
+
+    /**
+     * This test execute internal tasks over grid with default balancer.
+     *
+     * @throws Exception In case of error.
+     */
+    public void testInternalTaskDefaultBalancing() throws Exception {
+        customLoadBalancer = false;
+
+        ignite = startGrids(GRID_CNT);
+
+        // Task with GridInternal should pass.
+        assertEquals(TASK_RESULT, ignite.compute().execute(GridInternalTestTask.class.getName(),
null));
+
+        // Visor task should pass.
+        UUID nid = ignite.cluster().localNode().id();
+
+        GridTuple3<Boolean, Long, Long> ping = ignite.compute()
+            .execute(VisorNodePingTask.class.getName(), new VisorTaskArgument<>(nid,
nid, false));
+
+        assertTrue(ping.get1());
+
+        // Custom task should pass.
+        assertEquals(TASK_RESULT, ignite.compute().execute(CustomTestTask.class.getName(),
null));
+    }
+
+    /**
+     * Test task.
+     */
+    private static class CustomTestTask extends ComputeTaskSplitAdapter<Object, Object>
{
+        /** {@inheritDoc} */
+        @Override protected Collection<? extends ComputeJob> split(int gridSize, Object
arg) {
+            Collection<ComputeJob> jobs = new ArrayList<>(gridSize);
+
+            for (int i = 0; i < gridSize; i++)
+                jobs.add(new CustomTestJob());
+
+            return jobs;
+        }
+
+        /** {@inheritDoc} */
+        @Override public Serializable reduce(List<ComputeJobResult> results) {
+            assert results != null;
+
+            String res = "";
+
+            for (ComputeJobResult jobRes : results)
+                res += jobRes.getData();
+
+            return res;
+        }
+    }
+
+    /**
+     * Test job.
+     */
+    private static class CustomTestJob extends ComputeJobAdapter {
+        /** {@inheritDoc} */
+        @Override public String execute() {
+            return JOB_RESULT;
+        }
+    }
+
+
+    /**
+     * Test task marked with @GridInternal.
+     */
+    @GridInternal
+    private static class GridInternalTestTask extends CustomTestTask{
+
+    }
+
+    /**
+     * Special test balancer that will do not any balancing.
+     */
+    @IgniteSpiMultipleInstancesSupport(true)
+    private static class CustomLoadBalancerSpi extends IgniteSpiAdapter implements LoadBalancingSpi
{
+        /** {@inheritDoc} */
+        @Override public void spiStart(@Nullable String gridName) throws IgniteSpiException
{
+            // No-op.
+        }
+
+        /** {@inheritDoc} */
+        @Override public void spiStop() throws IgniteSpiException {
+            // No-op.
+        }
+
+        /** {@inheritDoc} */
+        @Override public ClusterNode getBalancedNode(ComputeTaskSession ses, List<ClusterNode>
top, ComputeJob job) throws IgniteException {
+            return null; // Intentionally return null.
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/89c30c8b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiLoadBalancingSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiLoadBalancingSelfTestSuite.java
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiLoadBalancingSelfTestSuite.java
index a20b3c8..52d4fdd 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiLoadBalancingSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiLoadBalancingSelfTestSuite.java
@@ -23,6 +23,7 @@ import org.apache.ignite.spi.loadbalancing.adaptive.GridAdaptiveLoadBalancingSpi
 import org.apache.ignite.spi.loadbalancing.adaptive.GridAdaptiveLoadBalancingSpiMultipleNodeSelfTest;
 import org.apache.ignite.spi.loadbalancing.adaptive.GridAdaptiveLoadBalancingSpiSelfTest;
 import org.apache.ignite.spi.loadbalancing.adaptive.GridAdaptiveLoadBalancingSpiStartStopSelfTest;
+import org.apache.ignite.spi.loadbalancing.internal.GridInternalTasksLoadBalancingSelfTest;
 import org.apache.ignite.spi.loadbalancing.roundrobin.GridRoundRobinLoadBalancingNotPerTaskMultithreadedSelfTest;
 import org.apache.ignite.spi.loadbalancing.roundrobin.GridRoundRobinLoadBalancingSpiLocalNodeSelfTest;
 import org.apache.ignite.spi.loadbalancing.roundrobin.GridRoundRobinLoadBalancingSpiMultipleNodesSelfTest;
@@ -52,25 +53,28 @@ public final class IgniteSpiLoadBalancingSelfTestSuite {
         TestSuite suite = new TestSuite("Ignite Load Balancing Test Suite");
 
         // Random.
-        suite.addTest(new TestSuite(GridWeightedRandomLoadBalancingSpiSelfTest.class));
-        suite.addTest(new TestSuite(GridWeightedRandomLoadBalancingSpiWeightedSelfTest.class));
-        suite.addTest(new TestSuite(GridWeightedRandomLoadBalancingSpiStartStopSelfTest.class));
-        suite.addTest(new TestSuite(GridWeightedRandomLoadBalancingSpiConfigSelfTest.class));
+        suite.addTestSuite(GridWeightedRandomLoadBalancingSpiSelfTest.class);
+        suite.addTestSuite(GridWeightedRandomLoadBalancingSpiWeightedSelfTest.class);
+        suite.addTestSuite(GridWeightedRandomLoadBalancingSpiStartStopSelfTest.class);
+        suite.addTestSuite(GridWeightedRandomLoadBalancingSpiConfigSelfTest.class);
 
         // Round-robin.
-        suite.addTest(new TestSuite(GridRoundRobinLoadBalancingSpiLocalNodeSelfTest.class));
-        suite.addTest(new TestSuite(GridRoundRobinLoadBalancingSpiMultipleNodesSelfTest.class));
-        suite.addTest(new TestSuite(GridRoundRobinLoadBalancingSpiTopologyChangeSelfTest.class));
-        suite.addTest(new TestSuite(GridRoundRobinLoadBalancingSpiNotPerTaskSelfTest.class));
-        suite.addTest(new TestSuite(GridRoundRobinLoadBalancingSpiStartStopSelfTest.class));
-        suite.addTest(new TestSuite(GridRoundRobinLoadBalancingNotPerTaskMultithreadedSelfTest.class));
+        suite.addTestSuite(GridRoundRobinLoadBalancingSpiLocalNodeSelfTest.class);
+        suite.addTestSuite(GridRoundRobinLoadBalancingSpiMultipleNodesSelfTest.class);
+        suite.addTestSuite(GridRoundRobinLoadBalancingSpiTopologyChangeSelfTest.class);
+        suite.addTestSuite(GridRoundRobinLoadBalancingSpiNotPerTaskSelfTest.class);
+        suite.addTestSuite(GridRoundRobinLoadBalancingSpiStartStopSelfTest.class);
+        suite.addTestSuite(GridRoundRobinLoadBalancingNotPerTaskMultithreadedSelfTest.class);
 
         // Adaptive.
-        suite.addTest(new TestSuite(GridAdaptiveLoadBalancingSpiSelfTest.class));
-        suite.addTest(new TestSuite(GridAdaptiveLoadBalancingSpiMultipleNodeSelfTest.class));
-        suite.addTest(new TestSuite(GridAdaptiveLoadBalancingSpiStartStopSelfTest.class));
-        suite.addTest(new TestSuite(GridAdaptiveLoadBalancingSpiConfigSelfTest.class));
+        suite.addTestSuite(GridAdaptiveLoadBalancingSpiSelfTest.class);
+        suite.addTestSuite(GridAdaptiveLoadBalancingSpiMultipleNodeSelfTest.class);
+        suite.addTestSuite(GridAdaptiveLoadBalancingSpiStartStopSelfTest.class);
+        suite.addTestSuite(GridAdaptiveLoadBalancingSpiConfigSelfTest.class);
+
+        // Load balancing for internal tasks.
+        suite.addTestSuite(GridInternalTasksLoadBalancingSelfTest.class);
 
         return suite;
     }
-}
\ No newline at end of file
+}


Mime
View raw message