# Trying to spin up 2 test nodes for Integration Testing

**URL:** <https://discuss.elastic.co/t/trying-to-spin-up-2-test-nodes-for-integration-testing/241896>\
**Category:** Elasticsearch\
**Created:** [July 20, 2020, 1:24pm UTC](https://discuss.elastic.co/t/trying-to-spin-up-2-test-nodes-for-integration-testing/241896 "2020-07-20T13:24:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![radhika](https://avatars.discourse-cdn.com/v4/letter/r/d6d6ee/32.png) [@radhika](https://discuss.elastic.co/u/radhika)\
**Post date:** [July 20, 2020, 1:24pm UTC](https://discuss.elastic.co/t/trying-to-spin-up-2-test-nodes-for-integration-testing/241896/1 "2020-07-20T13:24:48Z")

</div>

Hi,

I have written a ES plugin (using version ES 7.5.2) which I have been able to test successfully using a single node integration test environment. However, I have faced issues when running the same code on multiple nodes in the actual ES environment. I would like to recreate the issue locally for debugging my code, but I can't find a way to create a 2 node integration test environment.  
Here is my build.gradle file

```auto
    import org.elasticsearch.gradle.testclusters.TestClustersRegistry
    import org.elasticsearch.gradle.testclusters.TestClustersPlugin

    buildscript {
    repositories {
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath "org.elasticsearch.gradle:build-tools:7.5.2"
    }
    }

    apply plugin: 'java'
    apply plugin: 'idea'
    apply plugin: 'elasticsearch.esplugin'

    version = rootProject.file('VERSION.txt').text.trim()

    esplugin {
    description 'Elasticsearch scoring plugin'
    classname 'com.test.TestPlugin'
    name project.name
    version project.version
    licenseFile rootProject.file('LICENSE.txt')
    noticeFile rootProject.file('NOTICE.txt')
    }

    configure(rootProject) {
    TestClustersRegistry registry = rootProject.extensions.create("testClustersRegistry", TestClustersRegistry)
    TestClustersPlugin.configureClaimClustersHook(project.gradle, registry)
    TestClustersPlugin.configureStartClustersHook(project.gradle, registry)
    TestClustersPlugin.configureStopClustersHook(project.gradle, registry)
    }

    testClusters.integTest {
    testDistribution = 'DEFAULT'
    }

```

The 'elasticsearch.esplugin' plugin spins a node with the name 'integTest-0' under 'test clusters' in the build folder. Is there a way to create another node in the 'integTest' cluster.

Thank you very much in advance.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 17, 2020, 1:25pm UTC](https://discuss.elastic.co/t/trying-to-spin-up-2-test-nodes-for-integration-testing/241896/2 "2020-08-17T13:25:01Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
