[
https://issues.apache.org/jira/browse/CAUSEWAY-3647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andi Huber resolved CAUSEWAY-3647.
----------------------------------
Resolution: Fixed
{color:#1d1c1d}Root cause: With single threaded integration testing
({color}{*}not{*} {color:#1d1c1d}concurrent testing), when Spring's Context
happens to {color}*not*{color:#1d1c1d} being reused for consecutive test runs,
on some occasions I did see that our
{color}{{MetaModelContextFactory#metaModelContext}}{color:#1d1c1d} bean factory
method did not get called. This one is responsible to set the MMC singleton
reference.{color}
{color:#1d1c1d}Solution: When integration testing, we don't rely on
{color}{{MetaModelContextFactory#metaModelContext}}{color:#1d1c1d} getting
called by Spring, but instead hook into the
{color}{{beforeEach}}{color:#1d1c1d} step and do set the MMC singleton
reference there (explicitly for each test run).{color}
> [Regression] Spring Context Caching for integration tests is broken
> -------------------------------------------------------------------
>
> Key: CAUSEWAY-3647
> URL: https://issues.apache.org/jira/browse/CAUSEWAY-3647
> Project: Causeway
> Issue Type: Bug
> Components: Core
> Reporter: Andi Huber
> Assignee: Andi Huber
> Priority: Major
> Fix For: 2.0.0-RC4
>
>
> Maybe tests need their individual MetaModelContext instance in support of
> Spring context reuse?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)