Essentially you want to skip processing @BeforeClassOnce / 
@AfterClassOnce if there are no test methods to execute for said class 
being processed.


I think you should be able to call 
org.hibernate.testing.junit4.CustomRunner#computeTestMethods to 
accomplish this.  If computeTestMethods returns no methods, there are 
no test methods to be performed.


On Mon 26 Sep 2011 09:41:07 AM CDT, Strong Liu wrote:
> https://hibernate.onjira.com/browse/HHH-6677
>
> I don't find a elegant way to fix this….
> one option is in org.hibernate.testing.junit4.CustomRunner#withBeforeClasses, 
> we check if the test class has @Skip (and @RequiresDialect etc.), and if it 
> does, then return super.withBeforeClasses directly (i know this is not a good 
> way to do that)
>
> any suggestions?
>
> -----------
> Strong Liu<st...@hibernate.org>
> http://hibernate.org
> http://github.com/stliu
>
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev

-- 
st...@hibernate.org
http://hibernate.org
_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to