Skip to content

Commit c3f08e3

Browse files
committed
Suppress hdfsFixture if there are spaces in the path (#30302)
HDFS sets its thread-name format based partly on a URL-encoded version of the path, but the URL-encoding of spaces as `%20` is interpreted as a field in the formatted string of type `2`, which is nonsensical. This change simply skips these tests in this case.
1 parent 68ce328 commit c3f08e3

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

plugins/repository-hdfs/build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,11 @@ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
230230
fixtureSupported = true
231231
}
232232

233+
boolean legalPath = rootProject.rootDir.toString().contains(" ") == false
234+
if (legalPath == false) {
235+
fixtureSupported = false
236+
}
237+
233238
// Always ignore HA integration tests in the normal integration test runner, they are included below as
234239
// part of their own HA-specific integration test tasks.
235240
integTestRunner.exclude('**/Ha*TestSuiteIT.class')
@@ -248,7 +253,12 @@ if (fixtureSupported) {
248253
// Only include the HA integration tests for the HA test task
249254
integTestHaRunner.patternSet.setIncludes(['**/Ha*TestSuiteIT.class'])
250255
} else {
251-
logger.warn("hdfsFixture unsupported, please set HADOOP_HOME and put HADOOP_HOME\\bin in PATH")
256+
if (legalPath) {
257+
logger.warn("hdfsFixture unsupported, please set HADOOP_HOME and put HADOOP_HOME\\bin in PATH")
258+
} else {
259+
logger.warn("hdfsFixture unsupported since there are spaces in the path: '" + rootProject.rootDir.toString() + "'")
260+
}
261+
252262
// The normal integration test runner will just test that the plugin loads
253263
integTestRunner.systemProperty 'tests.rest.suite', 'hdfs_repository/10_basic'
254264
// HA fixture is unsupported. Don't run them.

0 commit comments

Comments
 (0)