Another technique that sometimes is best is just don't worry about
edge cases and try "all" the cases. I remember in the past we had
some edge cases in utf8 conversion code and had a few bugs, and I
believe it was Dan who just went ahead and added a test that tried
every character in the 16 bit range.
So for LOBS it might make sense to try for both insert and select
lob sizes increasing byte by byte for every length from 0 to some
number. Not sure exactly what number, but at least bigger than
a page, maybe bigger than a couple of network server query buffers?
It might be overkill, but seems like an easy test to write - will
guarantee coverage, and if
it runs too long just throw it into the "resource" intense suite instead
of the nightly. I seem to remember some network server bugs fixed this
releaase which were "off by one" kinds of errors that relyed exactly
on a particular byte length in the transfer.
Fernanda Pizzorno wrote:
I have started converting LOB related tests to Junit. The aim with this
is to document the coverage of the LOB related tests. I am interested in
finding out: (1) what is being tested, (2) what is the LOB size used to
test with (I have divided that into 3 categories Small, Medium and
Large), and (3) which of the drivers (Embedded and/or Client) is being
tested.
I have created a wiki page to keep track of which of the tests have
already been converted and had its coverage documented. This wiki page
can be found at: http://wiki.apache.org/db-derby/ConvertLobTestsToJunit.
I have used jdbcapi/lobStreams.java as an example of how I thought of
documenting the test coverage. Suggestions, and help converting the
tests and documenting are very welcome :).
- Fernanda
PS: I tried to link DERBY-1888 to DERBY-1889 but I got the following error:
Errors
An error occurred: com.atlassian.jira.exception.DataAccessException:
org.ofbiz.core.entity.GenericEntityException: while inserting:
[GenericEntity:IssueLink][destination,12351773][linktype,12310010][source,12351772][sequence,null][id,12313532]
(SQL Exception while executing the following:INSERT INTO issuelink (ID,
LINKTYPE, SOURCE, DESTINATION, SEQUENCE) VALUES (?, ?, ?, ?, ?)
(Duplicate entry '12313532' for key 1))
Has anyone seen this error before?