HHH-17850 - Add jacoco test coverage to the build

This commit is contained in:
Steve Ebersole 2024-03-14 15:00:56 -05:00
parent e6c106f527
commit f898de7e98
2 changed files with 10 additions and 2 deletions

View File

@ -33,6 +33,7 @@ apply plugin: 'org.hibernate.orm.build.java-module'
apply plugin: 'org.checkerframework' apply plugin: 'org.checkerframework'
apply plugin: "jacoco"
apply plugin: 'checkstyle' apply plugin: 'checkstyle'
apply plugin: 'build-dashboard' apply plugin: 'build-dashboard'
apply plugin: 'project-report' apply plugin: 'project-report'

View File

@ -41,11 +41,18 @@ public class SuperTypesEnhancementTest {
private static final ByteBuddyProxyHelper helper = new ByteBuddyProxyHelper( new ByteBuddyState() ); private static final ByteBuddyProxyHelper helper = new ByteBuddyProxyHelper( new ByteBuddyState() );
private static Stream<Arguments> superTypeMethods() { private static Stream<Arguments> superTypeMethods() {
return Arrays.stream( PrimeAmongSecondarySupertypes.class.getDeclaredMethods() ).map( e -> Arguments.of( e ) ); return Arrays.stream( PrimeAmongSecondarySupertypes.class.getDeclaredMethods() )
// need to filter out methods added by jacoco
.filter( method -> !method.isSynthetic() )
.map( Arguments::of );
} }
private static Stream<Arguments> interfaces() { private static Stream<Arguments> interfaces() {
return Arrays.stream( PrimeAmongSecondarySupertypes.class.getDeclaredMethods() ).map( m -> m.getReturnType() ).map( e -> Arguments.of( e ) ); return Arrays.stream( PrimeAmongSecondarySupertypes.class.getDeclaredMethods() )
// need to filter out methods added by jacoco
.filter( method -> !method.isSynthetic() )
.map( m -> m.getReturnType() )
.map( e -> Arguments.of( e ) );
} }
@ParameterizedTest @ParameterizedTest