Github user mmiklavc commented on the issue:
https://github.com/apache/metron/pull/1009
@nickwallen and @ottobackwards - I extracted the common setup components
into one parameterized method. I opted for setting private test class fields
with the components rather than invoking getComponent() because I thought it
was a bit cleaner. I also looked at doing this in @Before and @After setup
methods, but setup for each of the tests changes on a per-test basis.
We're currently employing a useful builder pattern to configure the test
components/infrastructure which generally means you provide invariants and then
build the object from them. It might also be worthwhile to look at a way to use
the builder pattern, but also change certain aspects of the setup within the
individual test cases, e.g. upload a new global config after spinning up the
components. This could make it more efficient to run multiple tests by using
@Before and @After to spin things up to run a battery of similar integration
tests. Do you guys think we need it for this test change?
---