Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions plugins/repository-hdfs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ normalization {
// ignore generated keytab files for the purposes of build avoidance
ignore '*.keytab'
// ignore fixture ports file which is on the classpath primarily to pacify the security manager
ignore '*HdfsFixture/**'
ignore 'ports'
}
}

Expand Down Expand Up @@ -152,20 +152,29 @@ for (String integTestTaskName : ['integTestHa', 'integTestSecure', 'integTestSec
runner {
onlyIf { BuildParams.inFipsJvm == false }
if (integTestTaskName.contains("Ha")) {
Path portsFile
File portsFileDir = file("${workingDir}/hdfsFixture")
if (integTestTaskName.contains("Secure")) {
Path path = buildDir.toPath()
portsFile = buildDir.toPath()
.resolve("fixtures")
.resolve("secureHaHdfsFixture")
.resolve("ports")
nonInputProperties.systemProperty "test.hdfs-fixture.ports", path
} else {
Path path = buildDir.toPath()
portsFile = buildDir.toPath()
.resolve("fixtures")
.resolve("haHdfsFixture")
.resolve("ports")
nonInputProperties.systemProperty "test.hdfs-fixture.ports", path
}
classpath += files("$buildDir/fixtures")
nonInputProperties.systemProperty "test.hdfs-fixture.ports", file("$portsFileDir/ports")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not hugely important, but the path here will be "${workingDir}/ports/ports" right? Maybe name the file "hdfsPorts" or something like that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've renamed this directory hdfsFixture to be most accurate.

classpath += files(portsFileDir)
// Copy ports file to separate location which is placed on the test classpath
doFirst {
mkdir(portsFileDir)
copy {
from portsFile
into portsFileDir
}
}
}

if (integTestTaskName.contains("Secure")) {
Expand Down