Maven DbUnit Plugin

dbunit-maven-plugin doesn't disconnect from PostgreSQL database

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    2

Description

From http://issues.appfuse.org/browse/APF-485:

In my custom set up, the database server is shutdown after the dao tests have run using a script that called the postgres command "pg_ctl stop".

Initially I was using maven to call the antrun plugin to run dbunit to load the sample data. This worked fine.

After I had changed to using the maven dbunit plugin, the database stop script hung.

My conclusion is that dbunit, run from the maven plug in, is not closing its database connection.

My solutions was to use:

pg_ctl stop -m f

This will shutdown the database without waiting for all clients to disconnect, forcing a role back for any currently open transactions.

Activity

Hide
Matt Raible added a comment -

Patch to close connection after each execution.

Show
Matt Raible added a comment - Patch to close connection after each execution.
Hide
Dan Tran added a comment -

could you re do the patch at the root of the plugin?

Show
Dan Tran added a comment - could you re do the patch at the root of the plugin?
Hide
Matt Raible added a comment -

Here's a patch from the proper location.

Show
Matt Raible added a comment - Here's a patch from the proper location.
Hide
Dan Tran added a comment -

applied. Thanks

Show
Dan Tran added a comment - applied. Thanks

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: