[MAGNOLIA-8320] [Timebox] Replace MockComponentProvider with a Guice base componenent provider in JUnit5 extensions Created: 24/Feb/22  Updated: 27/Oct/22

Status: Open
Project: Magnolia
Component/s: core
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Michael Duerig Assignee: Michael Duerig
Resolution: Unresolved Votes: 0
Labels: foundation_team, junit5
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to BUILD-698 Update Guice Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Epic Link: Basic JUnit 5
Team: Foundation

 Description   

The ComponentProviderSupport JUnit5 extension is backed by a MockComponentProvider instance. We should try to replace this with a Guice base component provider:

  • MockComponentProvider keeps static state, has an unclear lifecycle and it is often unclear when and where to call ComponentTestUtils.cleanup.
  • First step to deprecating ComponentTestUtils
  • GuiceComponentProvider would reuse the code from the Magnolia production setup
  • GuiceComponentProvider could prove harder to troubleshoot though (no bindings validation before actual injector creation)

We should spend ~3 days to figure out whether replacing is feasible, there are any major roadblocks, incompatibilities or unexpected difficulties. At the end of this task we should be in the position to decide whether we want to do the replacing or not and how much effort it would be.


Generated at Mon Feb 12 04:31:39 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.