With the last usage of the deprecated ModuleTestingEnvironment superclass removed from Omega, we're free to remove some of the junit-specific things from ModuleTestingHelper's implementation and look at how to split those dozens of methods up into a few classes with separate responsibilities.
This PR puts createHost and related methods in a new class named Engines. It's mostly used for the work that MTEExtension does behind the scenes, but those tests that use createClient to start additional engines may use it directly.
runWhile and related methods are in the class MainLoop. These are the methods that test authors will be interested in. The makeRelevant methods are currently here as well.
ModuleTestingHelper still exists for backwards compatibility, but I'd like to push tests to use the smaller MainLoop interface as much as possible.
Notes for Reviewers
There are a lot of lines, but I think it's okay to assume that all the methods in Engines and MainLoop were moved out of ModuleTestingEnvironment as-is.
MTEExtension does have some changes to allow the extension to provide the new classes to tests.
This should be reviewable/runnable per-commit.
To Do
[x] Docs. There's lots of old stuff specific to JUnit 4 that can go away, but we should be sure that the JUnit 5 replacements for those things have matching documentation.javadoc
With the last usage of the deprecated ModuleTestingEnvironment superclass removed from Omega, we're free to remove some of the junit-specific things from ModuleTestingHelper's implementation and look at how to split those dozens of methods up into a few classes with separate responsibilities.
This PR puts
createHost
and related methods in a new class namedEngines
. It's mostly used for the work thatMTEExtension
does behind the scenes, but those tests that usecreateClient
to start additional engines may use it directly.runWhile
and related methods are in the classMainLoop
. These are the methods that test authors will be interested in. ThemakeRelevant
methods are currently here as well.ModuleTestingHelper
still exists for backwards compatibility, but I'd like to push tests to use the smaller MainLoop interface as much as possible.Notes for Reviewers
There are a lot of lines, but I think it's okay to assume that all the methods in
Engines
andMainLoop
were moved out ofModuleTestingEnvironment
as-is.MTEExtension
does have some changes to allow the extension to provide the new classes to tests.This should be reviewable/runnable per-commit.
To Do
Docs. There's lots of old stuff specific to JUnit 4 that can go away, but we should be sure that the JUnit 5 replacements for those things have matching documentation.javadoc