From 7501ad03254bee799f1093adb9ad52f27261c9c4 Mon Sep 17 00:00:00 2001 From: Connor McCoy Date: Tue, 13 Oct 2015 08:30:58 -0700 Subject: [PATCH] [hbase10] Skip HBase MiniCluster tests on Windows --- .../java/com/yahoo/ycsb/db/HBaseClient10Test.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hbase10/src/test/java/com/yahoo/ycsb/db/HBaseClient10Test.java b/hbase10/src/test/java/com/yahoo/ycsb/db/HBaseClient10Test.java index 0db0bd6d..df5fd746 100644 --- a/hbase10/src/test/java/com/yahoo/ycsb/db/HBaseClient10Test.java +++ b/hbase10/src/test/java/com/yahoo/ycsb/db/HBaseClient10Test.java @@ -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,7 +81,9 @@ public class HBaseClient10Test { */ @AfterClass public static void tearDownClass() throws Exception { - testingUtil.shutdownMiniCluster(); + if (testingUtil != null) { + testingUtil.shutdownMiniCluster(); + } } /**