Skip to content

Commit

Permalink
Issue:3933 :- Update property name.
Browse files Browse the repository at this point in the history
Signed-off-by: Pranit Kumar <[email protected]>
  • Loading branch information
pranikum committed Jul 21, 2022
1 parent 2db4aa4 commit 297e57f
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions gradle/run.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,22 @@ import org.opensearch.gradle.testclusters.RunTask

apply plugin: 'opensearch.testclusters'

testClusters {
runTask {
testDistribution = 'archive'
}
}
def numNodes = findProperty('numNodes') as Integer ?: 1
def numZones = findProperty('numZones') as Integer ?: 1

testClusters {
runMultiNodeTask {
runTask {
testDistribution = 'archive'
}
}

final String nodes = findProperty('nodeCount') ?: "3"
final String zones = findProperty('zoneCount') ?: "1"
final int nodeCount = Integer.valueOf(nodes)
final int zoneCount = Integer.valueOf(zones)

testClusters {
runMultiNodeTask {
testDistribution = 'archive'
numberOfZones = zoneCount
numberOfNodes = nodeCount
numberOfNodes = numNodes
numberOfZones = numZones
}
}

tasks.register("run", RunTask) {
if (project.hasProperty('nodeCount')) {
if (project.hasProperty('numNodes') || project.hasProperty('numZones')) {
useCluster testClusters.runMultiNodeTask;
} else {
useCluster testClusters.runTask;
Expand Down

0 comments on commit 297e57f

Please sign in to comment.