Re: [hibernate-dev] HHH-6677 skip @BeforeClassOnce / @AfterClassOnce if test is ignored

2011-09-26 Thread Steve Ebersole
>> Essentially you want to skip processing @BeforeClassOnce / @AfterClassOnce >> if there are no test methods to execute for said class being processed. >> > > Ideally, we should skip processing @BeforeClassOnce / @AfterClassOnce and > @BeforeClass / @AfterClass but for now skipping these two Onc

Re: [hibernate-dev] HHH-6677 skip @BeforeClassOnce / @AfterClassOnce if test is ignored

2011-09-26 Thread Strong Liu
On Sep 26, 2011, at 11:47 PM, Steve Ebersole wrote: > Essentially you want to skip processing @BeforeClassOnce / @AfterClassOnce if > there are no test methods to execute for said class being processed. > Ideally, we should skip processing @BeforeClassOnce / @AfterClassOnce and @BeforeClass /

Re: [hibernate-dev] HHH-6677 skip @BeforeClassOnce / @AfterClassOnce if test is ignored

2011-09-26 Thread Steve Ebersole
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

[hibernate-dev] HHH-6677 skip @BeforeClassOnce / @AfterClassOnce if test is ignored

2011-09-26 Thread Strong Liu
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 kn