[hbase10] Skip HBase MiniCluster tests on Windows

This commit is contained in:
Connor McCoy 2015-10-13 08:30:58 -07:00
Родитель 57b22910b1
Коммит 7501ad0325
1 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -15,6 +15,7 @@
package com.yahoo.ycsb.db;
import static org.junit.Assume.assumeTrue;
import static org.junit.Assert.*;
import com.yahoo.ycsb.ByteIterator;
@ -56,6 +57,11 @@ public class HBaseClient10Test {
private HBaseClient10 client;
private Table table = null;
private static boolean isWindows() {
final String os = System.getProperty("os.name");
return os.startsWith("Windows");
}
/**
* Creates a mini-cluster for use in these tests.
*
@ -63,6 +69,9 @@ public class HBaseClient10Test {
*/
@BeforeClass
public static void setUpClass() throws Exception {
// Minicluster setup fails on Windows with an UnsatisfiedLinkError.
// Skip if windows.
assumeTrue(!isWindows());
testingUtil = HBaseTestingUtility.createLocalHTU();
testingUtil.startMiniCluster();
}
@ -72,8 +81,10 @@ public class HBaseClient10Test {
*/
@AfterClass
public static void tearDownClass() throws Exception {
if (testingUtil != null) {
testingUtil.shutdownMiniCluster();
}
}
/**
* Sets up the mini-cluster for testing.