Menu

dbunit Merge Request #28: DatabaseEnvironment - Optional "dbunit.properties" now loaded. (merged)

Merging...

Merged

Something went wrong. Please, merge manually

Checking if merge is possible...

Something went wrong. Please, merge manually

Hans Deragon wants to merge 1 commit from /u/deragon/dbunit/ to master, 2017-12-31

Optional "dbunit.properties" is now loaded and its content is merged
with that of System.getProperties(). Nothing special happens if
the file is missing (and such file is by default, missing).

"dbunit.properties" is useful for environment which make it difficult if
not impossible to use Maven's profiles. Example is IntelliJ IDEA which
when calling JUnit tests, bypass Maven completely. Since profiles are
not used, database configuration is not properly set and tests fail.
"dbunit.properties" contains the missing properties which a profile
would set.

Following is an example of the content of "dbunit.properties":

dbunit.profile.driverClass=org.hsqldb.jdbcDriver
dbunit.profile.url=jdbc:hsqldb:mem:.
dbunit.profile.schema=PUBLIC
dbunit.profile.user=sa
dbunit.profile.password=
dbunit.profile.unsupportedFeatures=BLOB,CLOB,SCROLLABLE_RESULTSET,INSERT_IDENTITY,TRUNCATE_TABLE,SDO_GEOMETRY,XML_TYPE
dbunit.profile.ddl=empty.sql

Simply create "dbunit.properties" under "src/test/resources.

Commit Date  
[df3276] by Hans Deragon Hans Deragon

Feature #215 - DatabaseEnvironment now loads dbunit.properties.

Optional "dbunit.properties" is now loaded and its content is merged
with that of System.getProperties(). Nothing special happens if the
file is missing (and such file is by default, missing).

2017-12-31 07:27:58 Tree

Discussion

  • Jeff Jensen

    Jeff Jensen - 2017-07-08

    Please update doc with user instructions on how to use this feature (your code notes are most of it so is nearly done!). Otherwise, it's a "secret feature" one only knows about if told or discover in code.

     
  • Hans Deragon

    Hans Deragon - 2017-11-07

    Still working on this one.

     
  • Andrew Landsverk

    I recently added another profile property: "dbunit.profile.multiLineSupport" so we will want to support that as well. :)

     
  • Hans Deragon

    Hans Deragon - 2017-12-04

    One can add any property in the file. What is documented is just an example.

     
  • Hans Deragon

    Hans Deragon - 2017-12-21

    I refreshed the commits. Should be fine now. Please proceed with the merge.

     
  • Jeff Jensen

    Jeff Jensen - 2017-12-21

    Thanks Hans!

    Some finishing actions needed please before merging:

    1. In devguide.apt, please lower case the "A MUST WHEN WORKING WITHIN AN IDE." sentence. Use a different approach to highlight a point if needed, such as a box, callout, underline, bold, italics.
    2. In devguide.apt, I think need to remove "dbunit" from this path: "create it under <<<dbunit src="" test="" resources="">>>".</dbunit>
    3. Please create a feature request ticket for this change for tracking.
    4. Update the changes.xml release "description" attribute with "dbunit.properties" at the end.
    5. Adjust your new changes.xml entry accordingly:
    <action dev="jeffjensen" type="add" issue="(new number)" system="sffeatures" due-to="deragon">DatabaseEnvironment also loads from dbunit.properties.</action>
    

    dev is the committer
    due-to is the author
    system is which SF Tracker list (so generates with the correct URL)

    Additionally, in future commits, please separate cleanup and movement/conversion changes from actual update changes by using separate commits. For example in this MR, have one commit for moving/converting the devguide from xdoc to apt and a second commit to add your changes.

     
  • Hans Deragon

    Hans Deragon - 2017-12-29

    This merge request is dependant on merge request #41 "devgude.xml converted to devguide.apt - Feature #214. (open)". Once merge request is merged in the master branch, this merge will be adapted to fast-forward.

     
    • Jeff Jensen

      Jeff Jensen - 2017-12-30

      Thanks for doing the updates. The other is merged so can update this one.

       
  • Hans Deragon

    Hans Deragon - 2017-12-30

    Ok, this merge request is ready now.

     
  • Jeff Jensen

    Jeff Jensen - 2017-12-31
    • Status: open --> merged
     

Log in to post a comment.

MongoDB Logo MongoDB