Menu

#139 Fix "integration tests"

2.6.0
closed-fixed
None
5
2018-04-21
2009-10-08
John Hurst
No

Some DbUnit tests run against a real database. The real database environment is configured via the profile-properties file. There are a couple of errors in this file relating to Oracle (e.g. dbunit.profile.oracle.unsupportedFeatures = INSERT_INDENTITY). Besides this, several tests fail when run on Oracle.

Review the tests and get them working on most/all of the supported databases.

Possibly replace profile.properties (hardcoded URLs/user/passwords) with Maven profiles/settings to make the build more flexible.

Possibly move integration tests from XxxTest classes to XxxIT, use Maven integration-test lifecycle phase. Automatically run DDL in pre-integration-test.

Discussion

  • John Hurst

    John Hurst - 2009-10-08
    • assigned_to: nobody --> jbhurst
    • status: open --> open-accepted
     
  • John Hurst

    John Hurst - 2009-12-27

    I've got the integration tests working again, with Oracle, PostgreSQL, MySQL, HSQLDB, Apache Derby and H2.

    There are numerous issues remaining however:
    - Not yet working for MS SQL-Server, Sybase
    - Different database targets not supported by CI build
    - Integration tests are not separated from unit tests; it's not clear whether any given test requires a running database or not
    - DatabaseEnvironment/Profile mechanism is quite awkward for specifying which test/features are to be done for which database targets. Current system uses a string to specify features to skip. Better to specify features to include?
    - SQL DDL not executed by Maven. Confusing/difficult manual steps to set up database schema
    - Some integration tests (e.g. SQLHelperDomainPostgreSQLTest) don't play well in current framework. I.e. executes its own DDL in the middle of the test
    - "Fixing" the tests introduced a few ugly hacks (marked "TODO") that need to be cleaned up.

    Thus, I am keeping the ticket open for now while I work on these.

     
  • Andrew Landsverk

    Jeff converted the properties to maven profiles recently. Apart from that, we've also fixed most of the tests at this time and can run them against Oracle, PostgreSQL, MySQL, HSQLDB, Derby and H2 in custom DbUnit Docker containers. The whole thing is wired up using Concourse CI, however, Concourse CI is still buggy in our test environments, seeking long term solution yet.

     

    Last edit: Jeff Jensen 2018-04-21
  • Andrew Landsverk

    • status: open-accepted --> closed-fixed
    • Release: --> 2.6.0
     

Log in to post a comment.