diff --git a/lucene/core/src/java/org/apache/lucene/util/Constants.java b/lucene/core/src/java/org/apache/lucene/util/Constants.java index 1bbfb6a96d1..44f54461ce3 100644 --- a/lucene/core/src/java/org/apache/lucene/util/Constants.java +++ b/lucene/core/src/java/org/apache/lucene/util/Constants.java @@ -46,6 +46,8 @@ public final class Constants { public static final boolean SUN_OS = OS_NAME.startsWith("SunOS"); /** True iff running on Mac OS X */ public static final boolean MAC_OS_X = OS_NAME.startsWith("Mac OS X"); + /** True iff running on FreeBSD */ + public static final boolean FREE_BSD = OS_NAME.startsWith("FreeBSD"); public static final String OS_ARCH = System.getProperty("os.arch"); public static final String OS_VERSION = System.getProperty("os.version"); diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java index 26e5cb0e2b4..3da83ea9700 100644 --- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java +++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java @@ -35,6 +35,8 @@ public class HdfsTestUtil { public static MiniDFSCluster setupClass(String dataDir) throws Exception { LuceneTestCase.assumeFalse("HDFS tests on Windows require Cygwin", Constants.WINDOWS); + LuceneTestCase.assumeFalse("HDFS do not work well with FreeBSD blackhole setup", Constants.FREE_BSD); + // LuceneTestCase.assumeFalse("HDFS tests on Windows require Cygwin", Constants.F); File dir = new File(dataDir); new File(dataDir).mkdirs();