>> 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 Once annotations > should be fine, since all our tests use those two in favor of junit ones.
Understood, but I literally just copied that from your subject line ;) >> 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. > > where should I call this method ? CustomRunner#withBeforeClasses? > as said in the jira comment , it would really great if we can plug into a > custom IgnoredBuilder into > org.junit.internal.builders.AllDefaultPossibilitiesBuilder No idea about this AllDefaultPossibilitiesBuilder. Sounds more like a question for the JUnit crowd. But in terms of calling computeTestMethods, yes it would be done in withBeforeClasses *as well as* in withAfterClasses. I was simply pointing out that that is better than writing the skip-condition-detection logic again. -- st...@hibernate.org http://hibernate.org _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev