Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Updated Hibernate tests #362

Closed
wants to merge 13 commits into from

3 participants

@kadishmal

These changes to test classes were made to make sure they do not fail for CUBRID Dialect. They cover these two scenarios:

  1. When column/table names were not quoted. These fail because those column names (TYPE, VALUE, SYS_USER, DATE, TIME, etc.) are reserved in CUBRID.

  2. When tests work with temporary tables which are not supported yet as of CUBRID 8.4.1. So they need to be @SkipForDialect. I added a comment to each skip why they skip for CUBRID.

These updates do not change any functionality of the tests. Only wrap some column/table names and skip some tests. Tested on default H2 - all success; tested with MySQL - same 13 known failures. Testing on CUBRID with these changes reduced the number of failed tests from 1000+ down to 500+.

I will investigate other failures and will send pull requests with the changes.

Edit: The Windows client for Github messed up some commits by automatically adding LF to CRLF conversion to my changes. Didn't display in the client. Noticed this only on Github. Sorry for that.

kadishmal added some commits
@kadishmal kadishmal Skip testParameterMixing test for CUBRID dialect. c775c6b
@kadishmal kadishmal Wrapped column names which may be reserved in some dialects. Also add…
…ed column declarations for properties which lacked column attribute.
7b56aa2
@kadishmal kadishmal Added import to Tooth test for previously committed @Column. 81f6658
@kadishmal kadishmal Wrapped "value" column names into "`value`" as they can be reserved i…
…n some dialects which would cause a test failure.
7c19a31
@kadishmal kadishmal Wrapped "time" column names into "`time`" as they can be reserved in …
…some dialects which would cause a test failure.
584133d
@kadishmal kadishmal Wrapped additional "type" column names into "`type`" as they can be r…
…eserved in some dialects which would cause a test failure.
b9a8230
@kadishmal kadishmal Wrapped "date" column names into "`date`" as they can be reserved in …
…some dialects which would cause a test failure.
065ab40
@kadishmal kadishmal Wrapped "SYS_USER" column names into "`SYS_USER`" as they can be rese…
…rved in some dialects which would cause a test failure.
9b6ffe2
@kadishmal kadishmal Quoted table names in tests otherwise fail in CUBRID dialect as these…
… names are reserved.
bfcd299
@kadishmal kadishmal Added a quoted "`data`" column name as this is a reserved word in CUB…
…RID.
ee1410c
@kadishmal kadishmal Quoted "value" column name as "`value`" since it's a reserved word in…
… CUBRID.
cc78fcf
@kadishmal kadishmal Skip this JoinedSubClassTest for CUBRID dialect as temp tables are no…
…t supported yet.

Raises "HibernateException: cannot doAfterTransactionCompletion
multi-table deletes using dialect not supporting temp tables".
bbb3902
@kadishmal kadishmal Skip these tests for CUBRID dialect as temp tables aren't supported yet.
Raises: "HibernateException: cannot doAfterTransactionCompletion
multi-table deletes using dialect not supporting temp tables"
e8e5233
@stliu stliu was assigned
@brmeyer
Collaborator

@kadishmal, I'm not a big fan of all of the quoted column names. That's going to be a lot harder to keep up in the future, as almost no one does that in contributions.

We're currently discussing alternatives on IRC and I'll document it in HHH-7717.

I'm cherry picking the rest of your commits into HHH-7716. Thanks!

@brmeyer brmeyer closed this
@kadishmal

Got it, thank you!

@brmeyer brmeyer reopened this
@brmeyer
Collaborator

@kadishmal, alright, I changed my mind ;) We're introducing auto-quoting on identifiers in 5.0, but for the rest of 4, this quoting fix shouldn't hurt anything. There's a few places where we check metadata or columns by name, but so far, this hasn't affected them. Thanks!

Cherry-picking the "quoted" commits into HHH-7717

@brmeyer brmeyer closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 24, 2012
  1. @kadishmal
  2. @kadishmal

    Wrapped column names which may be reserved in some dialects. Also add…

    kadishmal authored
    …ed column declarations for properties which lacked column attribute.
  3. @kadishmal
  4. @kadishmal

    Wrapped "value" column names into "`value`" as they can be reserved i…

    kadishmal authored
    …n some dialects which would cause a test failure.
  5. @kadishmal

    Wrapped "time" column names into "`time`" as they can be reserved in …

    kadishmal authored
    …some dialects which would cause a test failure.
  6. @kadishmal

    Wrapped additional "type" column names into "`type`" as they can be r…

    kadishmal authored
    …eserved in some dialects which would cause a test failure.
  7. @kadishmal

    Wrapped "date" column names into "`date`" as they can be reserved in …

    kadishmal authored
    …some dialects which would cause a test failure.
  8. @kadishmal

    Wrapped "SYS_USER" column names into "`SYS_USER`" as they can be rese…

    kadishmal authored
    …rved in some dialects which would cause a test failure.
  9. @kadishmal
  10. @kadishmal
  11. @kadishmal
  12. @kadishmal

    Skip this JoinedSubClassTest for CUBRID dialect as temp tables are no…

    kadishmal authored
    …t supported yet.
    
    Raises "HibernateException: cannot doAfterTransactionCompletion
    multi-table deletes using dialect not supporting temp tables".
  13. @kadishmal

    Skip these tests for CUBRID dialect as temp tables aren't supported yet.

    kadishmal authored
    Raises: "HibernateException: cannot doAfterTransactionCompletion
    multi-table deletes using dialect not supporting temp tables"
Something went wrong with that request. Please try again.