mirror of
https://github.com/apache/lucene.git
synced 2025-02-10 12:05:36 +00:00
SOLR-14047: Make sure tests don't pickup other Hadoop installs
Signed-off-by: Kevin Risden <krisden@apache.org>
This commit is contained in:
parent
8d07ba5c9c
commit
85b433e277
@ -50,7 +50,8 @@ Bug Fixes
|
||||
|
||||
Other Changes
|
||||
---------------------
|
||||
(No changes)
|
||||
|
||||
SOLR-14047: Make sure tests don't pickup other Hadoop installs (Kevin Risden)
|
||||
|
||||
================== 8.4.0 ==================
|
||||
|
||||
|
@ -74,11 +74,27 @@ public class HdfsTestUtil {
|
||||
}
|
||||
|
||||
public static void checkAssumptions() {
|
||||
ensureHadoopHomeNotSet();
|
||||
checkHadoopWindows();
|
||||
checkFastDateFormat();
|
||||
checkGeneratedIdMatches();
|
||||
}
|
||||
|
||||
/**
|
||||
* If Hadoop home is set via environment variable HADOOP_HOME or Java system property
|
||||
* hadoop.home.dir, the behavior of test is undefined. Ensure that these are not set
|
||||
* before starting. It is not possible to easily unset environment variables so better
|
||||
* to bail out early instead of trying to test.
|
||||
*/
|
||||
private static void ensureHadoopHomeNotSet() {
|
||||
if (System.getenv("HADOOP_HOME") != null) {
|
||||
LuceneTestCase.fail("Ensure that HADOOP_HOME environment variable is not set.");
|
||||
}
|
||||
if (System.getProperty("hadoop.home.dir") != null) {
|
||||
LuceneTestCase.fail("Ensure that \"hadoop.home.dir\" Java property is not set.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hadoop integration tests fail on Windows without Hadoop NativeIO
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user