accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Tubbs (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-4729) MiniAccumuloCluster should have a Singleton
Date Fri, 27 Oct 2017 15:45:00 GMT


Christopher Tubbs commented on ACCUMULO-4729:

There are two ways I've seen MiniAccumuloCluster shared with multiple tests:

1. A JUnit test having a {{@BeforeClass}} section to start the cluster, and an {{@AfterClass}}
section to stop it, with multiple {{@Test}} methods to each run a test.
2. Using {{accumulo-maven-plugin}} to launch (Mini)Accumulo at the {{pre-integration-test}}
phase of the Maven build lifecycle, and run many tests during the {{integration-test}} phase,
with the {{maven-failsafe-plugin}}, and then shut down at {{post-integration-test}} just before
integration tests are validated in the {{verify}} phase.

If MiniAccumuloCluster were made to have a singleton, I'm not sure it would be clear who would
be responsible for managing its lifecycle (shutting it down, starting it, etc.). And, this
would be especially weird if we still allowed {{new MiniAccumuloCluster}}s to be launched
separately from this singleton. That could be confusing.

For your use case, is it possible for you to simple assign {{new MiniAccumuloCluster}} to
a variable, which you share with all your tests? That seems like the best solution to me.

> MiniAccumuloCluster should have a Singleton
> -------------------------------------------
>                 Key: ACCUMULO-4729
>                 URL:
>             Project: Accumulo
>          Issue Type: Bug
>          Components: mini
>    Affects Versions: 1.8.1
>            Reporter: Jorge Machado
>            Priority: Minor
> As developer I would like to have something like MiniAccumuloCluster.getInstance() 
> That I can share with multiple tests

This message was sent by Atlassian JIRA

View raw message