[
https://issues.apache.org/jira/browse/PHOENIX-5071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16832099#comment-16832099
]
Thomas D'Silva commented on PHOENIX-5071:
-----------------------------------------
If a test requires starting a cluster with a non default config then it should
use the {{@Category(NeedsOwnMiniClusterTest.class)}} see
{{PartialCommitIT.doSetup()}} for an example of how to setup the minicluster.
All other tests can just extend {{ParallelStatsEnabledIT}} or
{{ParallelStatsDisabledIT}} depending on whether or not you want to use stats
for parallelization. All tests that extends these two base classes share the
same minicluster, so while writing test cases be sure to use
{{generateUniqueName()}} to generate a unique name for any tables/views. The
cluster is shut down when the number of tables reaches a threshold and a new
cluster is started (see {{BaseTest.tearDownMiniClusterIfBeyondThreshold()}}
> Document Phoenix unit and IT testing APIs
> -----------------------------------------
>
> Key: PHOENIX-5071
> URL: https://issues.apache.org/jira/browse/PHOENIX-5071
> Project: Phoenix
> Issue Type: Improvement
> Reporter: Geoffrey Jacoby
> Priority: Major
>
> Phoenix has a complex set of test classes for use in setting up or sharing
> mini-clusters for use in testing, but what they are and how/when to use them
> is mostly undocumented tribal lore. This presents a barrier for new
> developers (and since they change over time can trip up veteran ones too!)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)