You could use the Accumulo Maven Plugin which starts an Accumulo cluster for using MiniAccumulo.
https://accumulo.apache.org/accumulo2-maven-plugin/ Fluo, uses this and below are a few pointers. The following is a base for Fluo ITs that uses the mini Accumulo started by the maven plugin if it exists, otherwise it starts a mini (useful for running in an IDE). https://github.com/apache/fluo/blob/549d645addb330f4ae2e074447428cb86b5a9a3f/modules/integration-tests/src/main/java/org/apache/fluo/integration/ITBase.java#L74 Fluo is a multi module project. The link below shows configuring the plugin in the parent pom. Plugins do not inherit the dependencies of the project, that is why the plugin explicitly configures the Accumulo, Hadoop, and ZK versions. https://github.com/apache/fluo/blob/549d645addb330f4ae2e074447428cb86b5a9a3f/pom.xml#L279 The link below shows activating the plugin in the IT module. It inherits the config from the module. Not all modules activate the plugin. https://github.com/apache/fluo/blob/549d645addb330f4ae2e074447428cb86b5a9a3f/modules/integration-tests/pom.xml#L103 On Fri, Dec 13, 2019 at 10:30 AM Jim Hughes <[email protected]> wrote: > > Hi all, > > I work on GeoMesa and for the Accumulo 1.x line, we have been using the > MockAccumulo infrastructure for our unit/integration tests which run in > a Maven build. In Accumulo 2.x, since MockAccumulo is gone, we're > looking at using the MiniAccumulo cluster infrastructure. > > Are there best practices or examples of how to best use and reuse such a > cluster between unit tests? > > I see two broad options: First, using Maven's integration test > framework to start a cluster 'outside' of a unit test. Second, we've > build a test runner for HBase which starts a cluster and then runs the > various tests. This second approach has some small downsides, and > that's why I'm asking if the you all have any great ideas! > > Cheers, > > Jim >
