[hibernate-issues] [Hibernate-JIRA] Created: (ANN-825) TestCase could check for superclass of Dialect before skipping it

Juraci Paixao Krohling (JIRA) noreply at atlassian.com
Tue Apr 21 12:14:17 EDT 2009


TestCase could check for superclass of Dialect before skipping it
-----------------------------------------------------------------

                 Key: ANN-825
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-825
             Project: Hibernate Annotations
          Issue Type: Improvement
            Reporter: Juraci Paixao Krohling
            Assignee: Hardy Ferentschik
         Attachments: ANN-CheckSuperclassDialectsBeforeSkip.diff

If a subclass of org.hibernate.test.annotations.TestCase is annotated with @RequiresDialect (or any of its methods), TestCase tries to match the exact name of the dialect in order to decide to skip it or not. 

My suggestion (and the attached patch) adds another check. If I specify the superclass of a set of dialects (like Oracle8iDialect, which is superclass of Oracle9i and Oracle10g), the test won't skip the subclasses of Oracle8iDialect. 

How to reproduce:
1) Create a test case annotated with @RequiresDialect(Oracle8iDialect.class)
2) Configure the test to run using the Oracle9iDialect
3) The test will be skipped, even though Oracle9iDialect is a subclass of Oracle8iDialect

After the patch, the step 3 would be:
3) The test is not skipped. 

If there's a reason to not check the superclasses, please reject this JIRA. Otherwise, please review it and commit (or assign it back to me to commit).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list