Permalink
Browse files

ISPN-2597 Cassandra store does not require specific surefire settings

  • Loading branch information...
1 parent 4b78391 commit 5419efe000640eef660335e05d6cdd35206df346 @galderz galderz committed with tristantarrant Dec 14, 2012
@@ -64,14 +64,6 @@
</testResources>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <forkMode>pertest</forkMode>
- <parallel>false</parallel>
- </configuration>
- </plugin>
- <plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
@@ -21,70 +21,27 @@
*/
package org.infinispan.loaders.hbase;
-import java.io.IOException;
-
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.MiniHBaseCluster;
import org.infinispan.loaders.BaseCacheStoreTest;
import org.infinispan.loaders.CacheLoaderException;
import org.infinispan.loaders.CacheStore;
import org.infinispan.loaders.hbase.test.HBaseCluster;
import org.testng.annotations.AfterClass;
-import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
-import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@Test(groups = "functional", testName = "loaders.hbase.HBaseCacheStoreTest")
public class HBaseCacheStoreTest extends BaseCacheStoreTest {
HBaseCluster hBaseCluster;
- // private static final boolean USE_EMBEDDED = true;
-//
-// private EmbeddedServerHelper embedded;
-
-// HBaseTestingUtility testUtil;
-// MiniHBaseCluster cluster;
-// private int zooKeeperPort;
-
@BeforeClass(alwaysRun = true)
public void beforeClass() throws Exception {
hBaseCluster = new HBaseCluster();
-
-// log.info("Starting HBase cluster");
-// Configuration conf = HBaseConfiguration.create();
-// conf.setInt("hbase.master.assignment.timeoutmonitor.period", 2000);
-// conf.setInt("hbase.master.assignment.timeoutmonitor.timeout", 5000);
-// testUtil = new HBaseTestingUtility(conf);
-// testUtil.startMiniCluster();
-// cluster = testUtil.getHBaseCluster();
-// log.info("Waiting for active/ready HBase master");
-// cluster.waitForActiveAndReadyMaster();
-//
-// zooKeeperPort = testUtil.getConfiguration()
-// .getInt(HConstants.ZOOKEEPER_CLIENT_PORT, -1);
-
-// if (USE_EMBEDDED) {
-// embedded = new EmbeddedServerHelper();
-// embedded.setup();
-// }
-
-// super.setUp();
}
@AfterClass(alwaysRun = true)
public void afterClass() throws CacheLoaderException {
HBaseCluster.shutdown(hBaseCluster);
-
-// try {
-// testUtil.shutdownMiniCluster();
-// } catch (Exception e) {
-// throw new CacheLoaderException(e);
-// }
}
@Override
@@ -43,7 +43,18 @@ public HBaseCluster() {
testUtil = new HBaseTestingUtility(conf);
try {
- testUtil.startMiniCluster();
+ try {
+ testUtil.startMiniCluster();
+ } catch (NullPointerException e) {
+ // In some systems, this method can throw an NPE due to the system
+ // having an unexpected default umask setting. Hadoop expects the
+ // default umask to be 022 ('rwxr-x-r-x'), so if you get the NPE
+ // make sure you change it accordingly. More info:
+ // http://stackoverflow.com/questions/10525129/i-am-trying-to-run-showfilestatustest-given-in-hadoop-definited-guide-book-i-ge
+
+ throw new IllegalStateException("Hadoop expects default umask " +
+ "to be 022, seems like your system has a different one", e);
+ }
MiniHBaseCluster cluster = testUtil.getHBaseCluster();
log.info("Waiting for active/ready HBase master");
cluster.waitForActiveAndReadyMaster();
View
@@ -181,6 +181,7 @@
<version.org.jboss.staxmapper>1.1.0.Final</version.org.jboss.staxmapper>
<version.maven.bundle>2.3.7</version.maven.bundle>
<version.maven.source>2.2.1</version.maven.source>
+ <version.maven.scala>2.15.2</version.maven.scala>
<version.jacoco>0.5.10.201208310627</version.jacoco>
<version.asm>3.3.1</version.asm>
<reportTitle>Infinispan JaCoCo Report</reportTitle>
@@ -1902,7 +1903,7 @@
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
- <version>2.15.2</version>
+ <version>${version.maven.scala}</version>
<executions>
<execution>
<id>compile</id>
@@ -1951,7 +1952,7 @@
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
- <version>2.15.2</version>
+ <version>${version.maven.scala}</version>
<executions>
<execution>
<id>compile</id>
View
@@ -53,7 +53,7 @@
<module>cachestore/bdbje</module>
<module>cachestore/cloud</module>
<module>cachestore/remote</module>
- <!--<module>cachestore/cassandra</module>-->
+ <module>cachestore/cassandra</module>
<module>cachestore/hbase</module>
<module>server</module>
<module>server/core</module>

0 comments on commit 5419efe

Please sign in to comment.