-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure messageSource type is StaticMessageSource for tests #431
Conversation
…udes addMessage() methods after removing micronaut, the messageSource type was PluginAwareResourceBundleMessageSource instead of StaticMessageSource when the tests execute org.grails.plugins.i18n.I18nGrailsPlugin doWithSpring() sets messageSource to type PluginAwareResourceBundleMessageSource org.grails.testing.GrailsApplicationBuilder.build() sets messageSource to type StaticMessageSource in doWithSpringClosure which calls registerBeans()
Why wasn't it an issue before with Micronaut? |
So far my guess is order of execution with I experimented with setting it to |
@jamesfredley perhaps the real issue is that the i18n plugin should not be loaded? |
Disabling the i18n plugin results in no @jamesfredley I think the real issue here is the Lines 191 to 222 in 36c53d2
|
@codeconsole You are correct that |
StaticMessageSource
incudesaddMessage()
methods, required by testsafter removing micronaut, the
messageSource
type wasPluginAwareResourceBundleMessageSource
instead ofStaticMessageSource
when the tests executeorg.grails.plugins.i18n.I18nGrailsPlugin doWithSpring()
setsmessageSource
to typePluginAwareResourceBundleMessageSource
org.grails.testing.GrailsApplicationBuilder.build()
setsmessageSource
to typeStaticMessageSource
indoWithSpringClosure{}
which callsregisterBeans()
On grails/grails-core#13702
This fixes 22 tests that require StaticMessageSource
It also fixes 6 tests in
DataBindingConfigurationSpec
withValueConverters
using@Order