Hi
Similar effort from you and me, welcome. :-)
I wrote a scenario test to extract schema info.
from Openldap. And seems there are 2 bugs resides in ASN.1 framework.
1. When the response from server is extremely large - larger than
BerInputStream
buffer size, the buffer size relocation process will mistakenly calculate
new buffer size.
2. In method readContent, the if statement:
if (in.read(buffer, offset, length) != length) {
throw new ASN1Exception(Messages.getString("security.13C"));
//$NON-NLS-1$
}
offset += length;
is not enough to guarantee all the bytes are read into buffer. This can be
fixed using a while loop:
int numread = 0, oldoffset = offset;
while ((numread = in.read(buffer, offset, length)) > 0) {
offset += numread;
length -= numread;
if(length == 0) {
break;
}
}
length = offset - oldoffset;
I have reported the problems here.[1]
[1] https://issues.apache.org/jira/browse/HARMONY-5054
2007/11/1, Regis <[EMAIL PROTECTED]>:
>
>
> Recently I'm trying to integrate some scenario tests for ldap
> provider to BTI, it would be very helpful and convenience to create new
> adaptor.
>
> Sean Qiu wrote:
> > To add a task for BTI, we have to rewrite some scripts whose start are
> > similar.
> > So i think we can add a new task "create-adaptor" for BTI.I have create
> a
> > new jira for it [1].
> > we can use this task like:
> >
> > $>ant create-adaptor -Dadaptor=hello
> >
> > This task can create a new adaptor directory in ${trunk}/adapotrs named
> > after "hello" from the command line.
> > It can supply default settings from template files, such as generating
> > summary, getting dependecy.
> > We can put adaptor-template.xml and parameters-template.xml in
> > ${trunk}/script/template.
> > The task will replace the @SUITE@ at the template files to real suite
> name.
> >
> > What's more, we can supply more template files for different kinds of
> test
> > suites.
> > BTI developer can make advantage of these template files.
> >
> > Any thoughts? Additions? Comments?
> >
> > [1] https://issues.apache.org/jira/browse/HARMONY-5053
> >
>
--
Spark Shen
China Software Development Lab, IBM