db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1474) Add assertEquals overloads for Blob and Clob
Date Thu, 06 Jul 2006 16:26:33 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1474?page=all ]

Kristian Waagan updated DERBY-1474:
-----------------------------------

    Attachment: derby-1474-2a.diff
                derby-1474-2a.stat
                error-output.txt

Thanks for the comments Andreas.

I have changed the following in the *additional* patch 'derby-1474-2a.diff':
 1) Closed stream on successful execution through the assert methods. I don't see much need
to close when an error happens (within the assert method), including when the LOB contents
differ.

 2) Avoided string concatenation for every byte/char.

 3) Added a method to wrap an exception in an Error-object. I ask people to have a look at
this issue, as there are many ways to do this.

I had to use reflection in the 'generateError'-method in BaseTestCase, because it is compiled
with 1.3. Also, the way you want to throw the exception depends on the Java version.
If people think this is too much bloat, the exception stack traces can just be dumped to console.
I'm open to other approaches, but I would like to avoid having assertEquals throwing checked
exceptions.

I included the output from a simple test I wrote in 'error-output.txt', for people to see
what the output and stack traces will look like with the current implementation. The test
simply reads from a closed stream.


Awaiting feedback :)

> Add assertEquals overloads for Blob and Clob
> --------------------------------------------
>
>          Key: DERBY-1474
>          URL: http://issues.apache.org/jira/browse/DERBY-1474
>      Project: Derby
>         Type: Sub-task

>   Components: Test
>     Versions: 10.2.0.0, 10.3.0.0
>     Reporter: Kristian Waagan
>     Assignee: Kristian Waagan
>      Fix For: 10.2.0.0
>  Attachments: derby-1474-1a.diff, derby-1474-1a.stat, derby-1474-1b.diff, derby-1474-1c.diff,
derby-1474-2a.diff, derby-1474-2a.stat, error-output.txt
>
> Add assertEquals(Blob,Blob) and assertEquals(Clob,Clob) to BaseJDBCTestCase.
> The naming follows the JUnit scheme, and the methods throws an AssertionFailedError if
the objects passed in are not equal.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message