Add workaround so path.data can be set in run task

Previously you could set the system property tests.es.path.data and
start the run task with a custom data directory. A change in core to
detect duplicate settings broke this. That change should stay, but we
can work around this easily by only setting path.data to the data
directory if tests.es.path.data is not set.
This commit is contained in:
Jason Tedor 2017-05-05 15:56:09 -04:00
parent 7bd2abe48a
commit 4e5537d9ed

View File

@ -161,7 +161,10 @@ class NodeInfo {
} }
} }
env.put('ES_JVM_OPTIONS', new File(confDir, 'jvm.options')) env.put('ES_JVM_OPTIONS', new File(confDir, 'jvm.options'))
args.addAll("-E", "path.conf=${confDir}", "-E", "path.data=${-> dataDir.toString()}") args.addAll("-E", "path.conf=${confDir}")
if (!System.properties.containsKey("tests.es.path.data")) {
args.addAll("-E", "path.data=${-> dataDir.toString()}")
}
if (Os.isFamily(Os.FAMILY_WINDOWS)) { if (Os.isFamily(Os.FAMILY_WINDOWS)) {
args.add('"') // end the entire command, quoted args.add('"') // end the entire command, quoted
} }