ignite-3477-master fix IgniteCacheQueryNodeRestartDistributedJoinSelfTest
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/81a0f9a7 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/81a0f9a7 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/81a0f9a7 Branch: refs/heads/ignite-3477-master Commit: 81a0f9a711e5893f4ae172b9e49b65d191b179a1 Parents: 6bb4c81 Author: Dmitriy Govorukhin <[email protected]> Authored: Thu Apr 13 16:15:43 2017 +0300 Committer: Dmitriy Govorukhin <[email protected]> Committed: Thu Apr 13 16:15:43 2017 +0300 ---------------------------------------------------------------------- ...cheQueryNodeRestartDistributedJoinSelfTest.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/81a0f9a7/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java index 8367b2c..4f20078 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java @@ -36,6 +36,21 @@ import java.util.concurrent.atomic.AtomicIntegerArray; * Test for distributed queries with node restarts. */ public class IgniteCacheQueryNodeRestartDistributedJoinSelfTest extends IgniteCacheQueryAbstractDistributedJoinSelfTest { + /** Total nodes. */ + private int totalNodes = 6; + + /** {@inheritDoc} */ + @Override protected void beforeTestsStarted() throws Exception { + super.beforeTestsStarted(); + + if (totalNodes > GRID_CNT) { + for (int i = GRID_CNT; i < totalNodes; i++) + startGrid(i); + } + else + totalNodes = GRID_CNT; + } + /** * @throws Exception If failed. */ @@ -61,7 +76,7 @@ public class IgniteCacheQueryNodeRestartDistributedJoinSelfTest extends IgniteCa final int nodeLifeTime = 4000; final int logFreq = 100; - final AtomicIntegerArray locks = new AtomicIntegerArray(GRID_CNT); + final AtomicIntegerArray locks = new AtomicIntegerArray(totalNodes); SqlFieldsQuery qry0 ;
