The Accumulo ITs (any java files whose name ends in IT) would be a good
example since they are all run using MiniAccumuloCluster, with some being
able to run against a standalone cluster[1].  Some ITs start and stop a
cluster for every test, while others keep a cluster running for the whole
IT.  Any ITs that extend the AccumuloClusterHarness are standalone
capable.  For more information how to run the ITs against a standalone
cluster see the TESTING.md[2].

[1]
https://github.com/apache/accumulo/tree/3fd5cad92f9b63ac19e4466f3f2d5237b905262c/test/src/main/java/org/apache/accumulo/test
[2] https://github.com/apache/accumulo/blob/master/TESTING.md

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
>
>

Reply via email to