You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BootstrapUtils.resolveTestContextBootstrapper currently finds the first @BootstrapWith annotation to create the bootstrapper. If the user has accidentally included more than one @BootstrapWith annotation (via meta-annotated annotations) it's seemingly arbitrary which is used.
Prior to this commit it was possible for two @BootstrapWith annotations
to be 'present' on a test class -- for example, via competing custom
composed annotations. However, only one of the annotations will ever be
used to bootstrap the TestContext Framework. Thus, in such scenarios
one of the annotations will be silently ignored.
This commit introduces a check for such scenarios. BootstrapUtils'
resolveTestContextBootstrapper() method now throws an
IllegalStateException if more than one @BootstrapWith annotation is
'present' on a given test class.
Phil Webb opened SPR-12602 and commented
BootstrapUtils.resolveTestContextBootstrapper
currently finds the first@BootstrapWith
annotation to create the bootstrapper. If the user has accidentally included more than one@BootstrapWith
annotation (via meta-annotated annotations) it's seemingly arbitrary which is used.It would be better to throw an explicit error.
Affects: 4.1 GA
Issue Links:
Referenced from: commits e85e976
The text was updated successfully, but these errors were encountered: