keith-turner commented on PR #4772:
URL: https://github.com/apache/accumulo/pull/4772#issuecomment-2254212009
I looked for alternative ways to share code in test like this PR is doing
w/o using the inheritance pattern. Found the following strategy may work, but
it would be a large (in terms of diffs) change to the Accumulo code base and
not sure if its worthwhile.
1. Modify
[AccumuloClusterHarness.setupCluster()](https://github.com/apache/accumulo/blob/12c6433acb4b734e654594e76293710a5e4bd17e/test/src/main/java/org/apache/accumulo/harness/AccumuloClusterHarness.java#L114)
to be `AccumuloClusterHarness.setupCluster(TestInfo testInfo)` where
[TestInfo](AccumuloClusterHarness.setupCluster()) would be injected by junit.
2. Modify
[MiniClusterConfigurationCallback](https://github.com/apache/accumulo/blob/12c6433acb4b734e654594e76293710a5e4bd17e/test/src/main/java/org/apache/accumulo/harness/MiniClusterConfigurationCallback.java#L42)
to accept a TestInfo object.
3. Update all the code that calls MiniClusterConfigurationCallback to pass
the TestInfo object through.
4. Add `@Tag("FLAKY_AMPLE")` to a subset of test methods in CompactionIT
5. When CompactionIT executes cluster configuration it would have access
to the tags for the current running test and could look for the `FLAKY_AMPLE`
tag and when it sees it configure the Flaky manager and tserver.
With the above strategy could avoid the inheritance pattern this PR
introduces. Not sure if its worthwhile though. Step 3 above would change a
ton of code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]