bito-code-review[bot] commented on PR #16001:
URL: https://github.com/apache/grails-core/pull/16001#issuecomment-5006821564

   <!-- Bito Reply -->
   The observation is correct. In the test case, `dynamicPluginBean` is 
registered into `runtimeContext` (line 123), but the 
`ApplicationContextAotGenerator` is invoked using `context` (line 127), which 
does not contain the bean definition. Consequently, the AOT generator cannot 
see or record the bean, causing the final assertion to fail as expected.
   
   **grails-core/src/test/groovy/grails/aot/GrailsAotSmokeSpec.groovy**
   ```
   springConfiguration.registerBeansWithContext(runtimeContext)
               if 
(!runtimeContext.beanFactory.containsBeanDefinition('dynamicPluginBean')) {
                   throw new IllegalStateException('Plugin doWithSpring did not 
register dynamicPluginBean before AOT processing')
               }
               new ApplicationContextAotGenerator().processAheadOfTime(context, 
generationContext)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to