Overview
In the Spring Framework test suite, EnableJmsTests and AnnotationDrivenNamespaceTests extend AbstractJmsAnnotationDrivenTests which declares abstract @Test methods.
The @Test annotations are used as a form of documentation to signal that concrete implementations of those test methods must be annotated with @Test.
Running EnableJmsTests and AnnotationDrivenNamespaceTests by themselves does not result in any discovery issue warnings.
However, when running the test suite, AbstractJmsAnnotationDrivenTests also gets analyzed and results in the following invalid warnings.
WARNING: TestEngine with ID 'junit-jupiter' encountered 9 non-critical issues during test discovery:
(1) [WARNING] @Test method 'abstract void org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests.jmsListeners()' must not be abstract. It will not be executed.
Source: MethodSource [className = 'org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests', methodName = 'jmsListeners', methodParameterTypes = '']
at org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests.jmsListeners(SourceFile:0)
(2) [WARNING] @Test method 'abstract void org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests.sampleConfiguration()' must not be abstract. It will not be executed.
Source: MethodSource [className = 'org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests', methodName = 'sampleConfiguration', methodParameterTypes = '']
at org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests.sampleConfiguration(SourceFile:0)
(3) [WARNING] @Test method 'abstract void org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests.customConfiguration()' must not be abstract. It will not be executed.
Source: MethodSource [className = 'org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests', methodName = 'customConfiguration', methodParameterTypes = '']
at org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests.customConfiguration(SourceFile:0)
(4) [WARNING] @Test method 'abstract void org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests.jmsHandlerMethodFactoryConfiguration()' must not be abstract. It will not be executed.
Source: MethodSource [className = 'org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests', methodName = 'jmsHandlerMethodFactoryConfiguration', methodParameterTypes = '']
at org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests.jmsHandlerMethodFactoryConfiguration(SourceFile:0)
(5) [WARNING] @Test method 'abstract void org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests.explicitContainerFactory()' must not be abstract. It will not be executed.
Source: MethodSource [className = 'org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests', methodName = 'explicitContainerFactory', methodParameterTypes = '']
at org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests.explicitContainerFactory(SourceFile:0)
(6) [WARNING] @Test method 'abstract void org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests.fullConfiguration()' must not be abstract. It will not be executed.
Source: MethodSource [className = 'org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests', methodName = 'fullConfiguration', methodParameterTypes = '']
at org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests.fullConfiguration(SourceFile:0)
(7) [WARNING] @Test method 'abstract void org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests.defaultContainerFactory()' must not be abstract. It will not be executed.
Source: MethodSource [className = 'org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests', methodName = 'defaultContainerFactory', methodParameterTypes = '']
at org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests.defaultContainerFactory(SourceFile:0)
(8) [WARNING] @Test method 'abstract void org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests.fullConfigurableConfiguration()' must not be abstract. It will not be executed.
Source: MethodSource [className = 'org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests', methodName = 'fullConfigurableConfiguration', methodParameterTypes = '']
at org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests.fullConfigurableConfiguration(SourceFile:0)
(9) [WARNING] @Test method 'abstract void org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests.jmsListenerIsRepeatable()' must not be abstract. It will not be executed.
Source: MethodSource [className = 'org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests', methodName = 'jmsListenerIsRepeatable', methodParameterTypes = '']
at org.springframework.jms.annotation.AbstractJmsAnnotationDrivenTests.jmsListenerIsRepeatable(SourceFile:0)
Similar to #4635, I think the discovery issue check should be updated so that it does not report that, if the class in question is abstract.
Related Issues
Overview
In the Spring Framework test suite,
EnableJmsTestsandAnnotationDrivenNamespaceTestsextendAbstractJmsAnnotationDrivenTestswhich declaresabstract@Testmethods.The
@Testannotations are used as a form of documentation to signal that concrete implementations of those test methods must be annotated with@Test.Running
EnableJmsTestsandAnnotationDrivenNamespaceTestsby themselves does not result in any discovery issue warnings.However, when running the test suite,
AbstractJmsAnnotationDrivenTestsalso gets analyzed and results in the following invalid warnings.Similar to #4635, I think the discovery issue check should be updated so that it does not report that, if the class in question is
abstract.Related Issues
abstractinner class #4635