jdaugherty commented on code in PR #16093:
URL: https://github.com/apache/grails-core/pull/16093#discussion_r4132969086


##########
grails-testing-support-core/src/main/groovy/org/grails/testing/ParameterizedGrailsUnitTest.groovy:
##########
@@ -47,12 +47,16 @@ trait ParameterizedGrailsUnitTest<T> extends GrailsUnitTest 
{
             def cutType = getTypeUnderTest()
             if (cutType != null) {
                 mockArtefact(cutType)
-                final String beanName = getBeanName(cutType)
+                def beanName = getBeanName(cutType)
                 if (beanName != null && 
applicationContext.containsBean(beanName)) {
-                    _artefactInstance = applicationContext.getBean(beanName, T)
+                    _artefactInstance = applicationContext.getBean(beanName, 
cutType)
                 } else {
-                    _artefactInstance = cutType.newInstance()

Review Comment:
   technically this code would have worked for types not under test before and 
won't now?



-- 
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