From: Max R. A. <ma...@eo...> - 2002-11-02 22:51:01
Hi!
It seems there are "some" bug regarding the cgilib enhancer - or ?
Well, a derived problem from this is that the unit tests fails while having
open connections to the db!
Shouldn't we surround s.open/s.close with a try/finally where the finally
block just tries to close the connection ?
This will allow the tests to continue even though one test has previously
failed - if close is not called (MSQL at least) has
problems letting the code continue (it simply deadlocks :(
/max
From: Gavin K. <ga...@ap...> - 2002-11-02 22:57:43
I'm sure we *should* have some try / finallys. But adding them to all the
tests is going to be hard work. Up and till now I had kinda preferred the
way the tests actually stop when an exception occurs. I makes debugging
quicker.
----- Original Message -----
From: "Max Rydahl Andersen" <ma...@eo...>
To: <hib...@li...>
Sent: Sunday, November 03, 2002 9:50 AM
Subject: [Hibernate] try/finally in testcode ?
> Hi!
>
> It seems there are "some" bug regarding the cgilib enhancer - or ?
>
> Well, a derived problem from this is that the unit tests fails while
having
> open connections to the db!
> Shouldn't we surround s.open/s.close with a try/finally where the finally
> block just tries to close the connection ?
> This will allow the tests to continue even though one test has previously
> failed - if close is not called (MSQL at least) has
> problems letting the code continue (it simply deadlocks :(
>
> /max
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: See the NEW Palm
> Tungsten T handheld. Power & Color in a compact size!
> http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
> _______________________________________________
> hibernate-devel mailing list
> hib...@li...
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel
From: Max R. A. <ma...@eo...> - 2002-11-02 23:01:06
> I'm sure we *should* have some try / finallys. But adding them to all the
> tests is going to be hard work. Up and till now I had kinda preferred the
> way the tests actually stop when an exception occurs. I makes debugging
> quicker.
They don't stop, do they ? They halt - and wait....and waits...and waits :)
But if noone can see anything wrong to add try/finally to ensure
closing/releasing connections in junit's I will suggest
to not add or modify tests without having the try/finally stuff in place for
the new or modified test.
>
> ----- Original Message -----
> From: "Max Rydahl Andersen" <ma...@eo...>
> To: <hib...@li...>
> Sent: Sunday, November 03, 2002 9:50 AM
> Subject: [Hibernate] try/finally in testcode ?
>
>
> > Hi!
> >
> > It seems there are "some" bug regarding the cgilib enhancer - or ?
> >
> > Well, a derived problem from this is that the unit tests fails while
> having
> > open connections to the db!
> > Shouldn't we surround s.open/s.close with a try/finally where the
finally
> > block just tries to close the connection ?
> > This will allow the tests to continue even though one test has
previously
> > failed - if close is not called (MSQL at least) has
> > problems letting the code continue (it simply deadlocks :(
> >
> > /max
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by: See the NEW Palm
> > Tungsten T handheld. Power & Color in a compact size!
> > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
> > _______________________________________________
> > hibernate-devel mailing list
> > hib...@li...
> > https://lists.sourceforge.net/lists/listinfo/hibernate-devel
>
>
From: Gavin K. <ga...@ap...> - 2002-11-02 23:04:29
> They don't stop, do they ? They halt - and wait....and waits...and waits
:)
Interestingly *enough*, that depends upon the JDBC driver....
Its all part of "write once, run anywhere"...... ;)