You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by John Embretsen <Jo...@Sun.COM> on 2006/08/24 16:14:08 UTC

JUnit 3.8.2 has better (?) String diffs (was: Re: [jira] Commented: (DERBY-1417) Add new, lengthless overloads to the streaming api)

FYI:

JUnit 3.8.2, which was released late last year, includes a number of 
bugfixes and small improvements from the version that is currently 
officially supported by our test harness, 3.8.1.

The most noticeable improvement is a change to the String comparison 
format. For example, with JUnit 3.8.1, if we compare two SQLStates that 
are almost the same, but not quite, JUnit will report something like 
this (don't mind the actual failure, I simply tweaked the test to make a 
point):

 > There was 1 failure:
 > 1) 
testStatementExecuteAfterConnectionClose(org.apache.derbyTesting.functionTests.tests.jdbc4.StatementTest)junit.framework.ComparisonFailure: 
Unexpected SQL state for performing operations on a closed statement. 
expected:<...6> but was:<...3>
 > FAILURES!!!

It is hard to see what the SQLState we actually got was, and further 
debugging is required.

With JUnit 3.8.2, this is what we'll see instead:

 > There was 1 failure:
 > 1) 
testStatementExecuteAfterConnectionClose(org.apache.derbyTesting.functionTests.tests.jdbc4.StatementTest)junit.framework.ComparisonFailure: 
Unexpected SQL state for performing operations on a closed statement. 
expected:<0800[6]> but was:<0800[3]>
 > FAILURES!!!


The rest of 3.8.2 is , AFAIK, compatible with 3.8.1.

JUnit 3.8.2 can be downloaded from
http://sourceforge.net/project/showfiles.php?group_id=15278
(scroll down past the 4.1 release).

I'm attaching the changelog, since I downloaded it some months ago and I 
am not able to find it online any longer.

Try it out if you want. Perhaps we should start recommending JUnit 3.8.2 
instead of 3.8.1?


-- 
John


Knut Anders Hatlen (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/DERBY-1417?page=comments#action_12430163 ] 
>             
> Knut Anders Hatlen commented on DERBY-1417:
> -------------------------------------------
> 
> Hi Kristian, I tried to run derbyall with the 8a patch and the patch for DERBY-1473. I see this error:
> 
> *** End:   TestQueryObject jdk1.6.0-rc jdbc40:jdbc40 2006-08-24 00:50:02 ***
> ********* Diff file jdbc40/jdbc40/PreparedStatementTest.diff
> *** Start: PreparedStatementTest jdk1.6.0-rc jdbc40:jdbc40 2006-08-24 00:51:29 ***
> 0 add
>> ................................F.........
>> There was 1 failure:
>> 1) testSetBinaryStreamLengthLessOnBlobTooLong(org.apache.derbyTesting.functionTests.tests.jdbc4.PreparedStatementTest)junit.framework.ComparisonFailure: Unexpected SQL state. expected:<...CL30> but was:<...SDA4>
>> FAILURES!!!
>> Tests run: 82,  Failures: 1,  Errors: 0
> Test Failed.
> *** End:   PreparedStatementTest jdk1.6.0-rc jdbc40:jdbc40 2006-08-24 00:51:34 ***


Re: JUnit 3.8.2 has better (?) String diffs

Posted by Daniel John Debrunner <dj...@apache.org>.
John Embretsen wrote:
> Myrna van Lunteren wrote:
> 
>> Did you by chance try out the 3.8.2 junit with derbyall? (I assume so
>> but you didn't say).
> 
> 
> Yes, a few times. To verify, I just synced my clean working copy of
> trunk (SVN 436672) and gave derbyall w/junit3.8.2 a try:

I'm also running 3.8.2 with no new issues on IBM's 1.4.2 and Linux.

Dan.


Re: JUnit 3.8.2 has better (?) String diffs

Posted by John Embretsen <Jo...@Sun.COM>.
Myrna van Lunteren wrote:

> Did you by chance try out the 3.8.2 junit with derbyall? (I assume so 
> but you didn't say).

Yes, a few times. To verify, I just synced my clean working copy of 
trunk (SVN 436672) and gave derbyall w/junit3.8.2 a try:

* Sun's JVM 1.4.2 - 0 failures
* Sun's JVM 1.5.0 - 1 failure (derbynet/dataSourcePermissions_net.java, 
not related to JUnit)

and I gave the jdbc40 suite w/junit 3.8.2 a try using

* Sun's JVM 1.6.0-rc_b97 - 1 failure (TestQueryObject.java, which also 
fails with junit 3.8.1)


The test host OS was Solaris 10 (x86).


-- 
John

Re: JUnit 3.8.2 has better (?) String diffs (was: Re: [jira] Commented: (DERBY-1417) Add new, lengthless overloads to the streaming api)

Posted by Myrna van Lunteren <m....@gmail.com>.
On 8/24/06, John Embretsen <Jo...@sun.com> wrote:
>
> FYI:
>
> JUnit 3.8.2, which was released late last year, includes a number of
> bugfixes and small improvements from the version that is currently
> officially supported by our test harness, 3.8.1.
>

[ snip description of difference/improvement ]

 The rest of 3.8.2 is , AFAIK, compatible with 3.8.1.
>
> JUnit 3.8.2 can be downloaded from
> http://sourceforge.net/project/showfiles.php?group_id=15278
> (scroll down past the 4.1 release).
>

[ snip change log ]

 Try it out if you want. Perhaps we should start recommending JUnit 3.8.2
> instead of 3.8.1?
>
> --
> John
>

Good thing you downloaded the changelog, if it's not online anymore. :-)

I'd think it makes sense to use the newer version if there's no trouble...
Did you by chance try out the 3.8.2 junit with derbyall? (I assume so but
you didn't say).

Myrna

Re: JUnit 3.8.2 has better (?) String diffs

Posted by John Embretsen <Jo...@Sun.COM>.
Daniel John Debrunner wrote:
> John Embretsen wrote:
>> FYI:
>>
>> JUnit 3.8.2, which was released late last year, includes a number of
>> bugfixes and small improvements from the version that is currently
>> officially supported by our test harness, 3.8.1.
> [snip]
>> Try it out if you want. Perhaps we should start recommending JUnit 3.8.2
>> instead of 3.8.1?
> 
> Where do you see 3.8.1 is recommended?
> 
> In the BUILDING.txt I see '3.8.*' being used with a comment saying derby
> has been built successfully on 3.8.1. In the testing README I see no
> version numbers against JUnit.

I thought I had seen such a recommendation (3.8.1) in BUILDING.txt 
before, but apparently my mind played a trick on me. Sorry for not 
having done proper research before posting. Anyway, "recommended" is not 
the right word to use, but this is the wording on 
http://wiki.apache.org/db-derby/DerbyJUnitTesting:

"The usage of JUnit in Derby is currently based on JUnit 3.8.1."

And then there are direct links to JUnit 3.8.1 information.

Once it has been verified that 3.8.2 works as well as 3.8.1 with Derby, 
I guess we could update those links.

My point was to let folks know that 3.8.2 has some useful improvements 
over 3.8.1, since people may be having a hard time finding this kind of 
information on the JUnit web site or SourceForge.


-- 
John



Re: JUnit 3.8.2 has better (?) String diffs

Posted by Daniel John Debrunner <dj...@apache.org>.
John Embretsen wrote:
> FYI:
> 
> JUnit 3.8.2, which was released late last year, includes a number of
> bugfixes and small improvements from the version that is currently
> officially supported by our test harness, 3.8.1.
[snip]
> Try it out if you want. Perhaps we should start recommending JUnit 3.8.2
> instead of 3.8.1?

Where do you see 3.8.1 is recommended?

In the BUILDING.txt I see '3.8.*' being used with a comment saying derby
has been built successfully on 3.8.1. In the testing README I see no
version numbers against JUnit.

Dan.