Menu

dbunit Merge Request #39: Multi Primary Key scenario fixed. (open)

Merging...

Merged

Something went wrong. Please, merge manually

Checking if merge is possible...

Something went wrong. Please, merge manually

Puneet Behl wants to merge 1 commit from /u/puneet739/dbunit/ to master, 2017-12-10

Fixing scenario for multiple tables and only specifiing key for selected tables.

Commit Date  
[29d120] (dbunit_multiprimarykey) by Puneet.behl Puneet.behl

Making filter use only in generic scenario. If there is no custom filter provided. Use default mechanism as fallback for primary key

2017-11-09 09:55:37 Tree

Discussion

  • Jeff Jensen

    Jeff Jensen - 2017-11-15

    Thank you.

    I will merge this in the near future, after fixing current build and runtime problems.

     
  • Andrew Landsverk

    Puneet, I was testing this on our integration CI server. We are getting some mismatched expected/actual results in the tests.

    For H2, HSQLDB and MS SQL Server:

    DatabaseDataSetIT.testMultiPrimaryKey:191 column name expected:<[IDENTITY_TABLE_ID]> but was:<[COLUMN3]>

    For Derby, MySQL and PostgreSQL:

    DatabaseDataSetIT.testMultiPrimaryKey:183 » NoSuchTable IDENTITY_TABLE

    With regards to MySQL and PostgreSQL, they are failing because they do not support the INSERT_IDENTITY feature in dbunit. You should be able to check for this in your IT by calling connection.getConfig.getFeature and pass the feature name.

    With regards to testing the embedded databases, Derby, H2, etc. you can test these locally by running the following maven commands:

    mvn -B -e -U verify -Pit-config,hsqldb
    mvn -B -e -U verify -Pit-config,derby
    mvn -B -e -U verify -Pit-config,h2
    

    Please let us know if you have questions :)

    Thanks!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.