db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject Re: Common Junit test conversion mistakes
Date Thu, 02 Aug 2007 19:35:43 GMT
Ramin Moazeni wrote:
> Hi Kathey
>
> Some comments I have regarding the test conversions:
> 1) no need to close the statements created with createStatement() as
> they are now cleaned up automatically.
> 2) to get expected SQLStates:
>  * use the canon file located at functionTests/master/someTest.out to
> capture expected SQLStates.
> or
>  * put System.out.println("Expected message: "+ e.getSQLState() +":" +
> e.getMessage()); statements in the new test, to get the SQLStates
>
> Ramin
>
> On 7/5/07, Kathey Marsden <kmarsdenderby@sbcglobal.net> wrote:
>   
>> I updated the wiki page:
>> http://wiki.apache.org/db-derby/ConvertOldTestToJunitTips
>>
>> with some common JUnit conversion mistakes, since we all seem to hit the
>> same tripwires starting out.   I am hoping that folks, especially those
>> who recently started converting tests (Ugo, Ramin and Ravinder) as well
>> as those who have been reviewing tests (Dan, Myrna, Knut) could take a
>> look and see if there is anything that should be added. Also I want to
>> give an example of a really good simple test that newcomers could study
>> or use as a template to get started.  Does anyone have a suggestion for
>> which test this should be?
>>
>>
>>     
Thanks Ramin, these are great tips. Can you add them to the Wiki page?

Kathey


Mime
View raw message