mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
Set java.io.tmpdir to Gradle's build directory for unit and integration tests. (#638)
This commit is contained in:
parent
25dbac0f07
commit
0ed009dfa0
@ -123,6 +123,11 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(Test) {
|
||||
// Prevent the project from creating temporary files outside of the build directory.
|
||||
systemProperties['java.io.tmpdir'] = buildDir
|
||||
}
|
||||
|
||||
group 'net.corda'
|
||||
version "$corda_release_version"
|
||||
|
||||
|
@ -589,7 +589,8 @@ class DriverDSL(
|
||||
|
||||
val systemProperties = overriddenSystemProperties + mapOf(
|
||||
"name" to nodeConf.myLegalName,
|
||||
"visualvm.display.name" to "corda-${nodeConf.myLegalName}"
|
||||
"visualvm.display.name" to "corda-${nodeConf.myLegalName}",
|
||||
"java.io.tmpdir" to System.getProperty("java.io.tmpdir") // Inherit from parent process
|
||||
)
|
||||
val extraJvmArguments = systemProperties.map { "-D${it.key}=${it.value}" } +
|
||||
"-javaagent:$quasarJarPath"
|
||||
@ -621,7 +622,10 @@ class DriverDSL(
|
||||
className = className, // cannot directly get class for this, so just use string
|
||||
arguments = listOf("--base-directory", handle.configuration.baseDirectory.toString()),
|
||||
jdwpPort = debugPort,
|
||||
extraJvmArguments = listOf("-Dname=node-${handle.configuration.p2pAddress}-webserver"),
|
||||
extraJvmArguments = listOf(
|
||||
"-Dname=node-${handle.configuration.p2pAddress}-webserver",
|
||||
"-Djava.io.tmpdir=${System.getProperty("java.io.tmpdir")}" // Inherit from parent process
|
||||
),
|
||||
errorLogPath = Paths.get("error.$className.log")
|
||||
)
|
||||
}.flatMap { process -> addressMustBeBound(executorService, handle.webAddress, process).map { process } }
|
||||
|
Loading…
Reference in New Issue
Block a user