You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Oscar Picasso <os...@yahoo.com> on 2005/09/01 14:51:23 UTC
Ibatis and Junit tests
Hi,
I am testing an Ibatis application with Junit.
I want to start each individual test method with a new database, so the Junit
setup() method executes a script to create a new database and its schema and
the Junit tearDown() method executes a shell script that drops the database.
The Ibatis application use a DaoManager.
The problem is that when tearDown() is executed there are still open
connections so the shell script cannot drop the database.
How can I close the connections opened by the framework?
Thanks
Oscar
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: Ibatis and Junit tests
Posted by Larry Meadors <la...@gmail.com>.
Have you looked at dbUnit?
I have used to to do DAO testing, and been very happy with it.
Larry
On 9/1/05, Oscar Picasso <os...@yahoo.com> wrote:
> Hi,
>
> I am testing an Ibatis application with Junit.
>
> I want to start each individual test method with a new database, so the Junit
> setup() method executes a script to create a new database and its schema and
> the Junit tearDown() method executes a shell script that drops the database.
>
> The Ibatis application use a DaoManager.
>
> The problem is that when tearDown() is executed there are still open
> connections so the shell script cannot drop the database.
>
> How can I close the connections opened by the framework?
>
> Thanks
>
> Oscar
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>