mirror of https://github.com/apache/lucene.git
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
4d5df0e20a
commit
322ed8ce4d
|
@ -123,7 +123,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…
Reference in New Issue