db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren" <m.v.lunte...@gmail.com>
Subject Re: csPrepStmt to junit
Date Wed, 07 Mar 2007 20:52:05 GMT
On 3/6/07, Øystein Grøvlen <Oystein.Grovlen@sun.com> wrote:
> Manjula Kutty wrote:
> > Hi
> >
> > I thought of converting derbynet/csPrepStmt.java to junit, but then I
> > found PrepareStatementTest.java under derbynet, which does similar
> > things or more. But I wonder then why the csPrepStmt.java is still there
> > under derbyall? Or Am I in wrong assumption that those two tests are
> > similar? Any input on this regard is very welcome
> >
> I converted derbynet/prepStmt.java to PrepareStatementTest.java
> (DERBY-2100).  I also wondered what was the difference between the
> prepStmt and the csPrepStmt test, but I did not look into it any further.
> --
> Øystein
I had a look at the historical versions; in the original Cloudscape
source tree there was only one (prepStmt.java).
However, the first version I find of the tests in svn (revision 57305)
already has 2 tests. Could be some undesired creativity on my side
when I prepared this for contribution. :-)

With this earliest revision the two tests seem largely identical,
except that the csPrepStmt.java has a test called  testLobInRs(),
apparently intended to test a fix of a bug ('beetle 5292', which had
this explanation:  NullPointerException on the server and
ArrayIndexOutOfBoundsException in the client, occur when LOB columns
are returned as part of a result set for either a stored prepared
statement or a stored procedure.)

Comparing the latest versions of the two tests, shows that still, the
original testLobInRS() test only lives in csPrepStmt, and nothing much
else has gone in, but the PrepareStatement.java has considerably more
lob/clob testing than the original PrepStmt had. Still, there is no
getString() on a blob or clob value...

jdbcapi/BlobClob4BlobTest.java does a getString() for a
preparedStatement clob, not a blob, but it looks like this
functionality is covered in LOBTest.java.

It does appear to me that csPrepStmt.java can be removed.


View raw message