springtestdbunit / spring-test-dbunit

Integration between the Spring testing framework and DBUnit
http://springtestdbunit.github.com/spring-test-dbunit/
Apache License 2.0
476 stars 238 forks source link

Fix for @DatabaseSetup annotation on superclasses #138

Open dsteegen opened 7 years ago

dsteegen commented 7 years ago

Hi,

This pull request should fix issue #103. The class DbUnitRunner will now use the overloaded findAnnotation method on the org.springframework.core.annotation.AnnotationUtils class in Spring Core that takes a Class<?> as an argument opposed to AnnotatedElement. The latter will only look for the annotation on the given class while the other methods tries to look on it's parent classes/interfaces if the annotation is not present on the given class itself.

This reintroduces the behaviour from older version of spring-test-dbunit.

ppodgorsek commented 5 years ago

This fix has been done in a maintained repository: https://github.com/ppodgorsek/spring-test-dbunit