You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Alex Karasulu <ak...@apache.org> on 2008/02/13 09:23:07 UTC

Test coverage & documentation in MINA to promote more collaboration (Was: Re: mina and jdk6u4)

I've been noticing and hearing many complaints about the amount of tests and
overall coverage in the MINA code base.  If there was more coverage
contributors and committers would feel much more comfortable making changes
knowing they're not going to break something.

At some point we need to stop growing the code base like mad and just start
documenting and thoroughly testing the code.  Otherwise as we grow the
barrier of entry into the heart of MINA especially will increase.

Alex

On Feb 13, 2008 12:00 AM, 이희승 (Trustin Lee) <tr...@gmail.com> wrote:

> 2008-02-01 (금), 13:57 +0100, Emmanuel Lecharny 쓰시길:
> > Makoto YUI wrote:
> > > I have the same problem to you.
> > > I'm using the latest snapshot (
> mina-core-2.0.0-M1-20080124.103130-116.jar).
> > >
> > > | java.lang.ArrayIndexOutOfBoundsException
> > > | at
> > > org.apache.mina.util.CircularQueue.shrinkIfNeeded(CircularQueue.java
> :233)
> > >
> > > This problem caused when newLen is less than the length of
> > > System.arraycopy().
> > >
> > > | Object[] tmp = new Object[newLen];
> > > | ..
> > > |            if (first < last) {
> > > |                System.arraycopy(items, first, tmp, 0, last - first);
> > > * bug
> > > |            } else {
> > > |                System.arraycopy(items, first, tmp, 0, oldLen -
> first);   *
> > > bug
> > > |                System.arraycopy(items, 0, tmp, oldLen - first,
> last);    *
> > > bug
> > > |            }
> > >
> > > It seems to be preferred to use java.util.LinkedList instead of custom
> > > CircularQueue
> > > for messageQueue(s) in
> > > AbstractProtocolEncoderOutput/AbstractProtocolDecoderOutput.
> > >
> > > Thanks,
> > >
> > > Makoto YUI
> > >
> > I don't think that it's a problem to use our own brewed CircularQueue
> ...
> >
> > I looked at the code, and I'm a little bit annoyed that there is
> > absolutely no comment at all. There is a clear bug somewhere, as you got
> > a java.lang.ArrayIndexOutOfBoundsException (and many thanks for having
> > posting this mail, btw !!!), but without a knowledge about what is doing
> > this class, it's really difficult to find a fix in 2 minutes. This
> > should not be the case...
> >
> > Btw, there is no test cases either...
>
> I wrote that evil code hehe. :)
>
> There's test case for CircularQueue in 1.x branch, but it was removed
> from the trunk when I replace it with LinkedList.  After then, I
> realized the CircularQueue implementation performs better than
> LinkedList, so I resurrected it.  However, I forgot to resurrect the
> test case together.  Will take care of this when I get back home.
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
>

Re: Test coverage & documentation in MINA to promote more collaboration (Was: Re: mina and jdk6u4)

Posted by Mark Webb <el...@gmail.com>.
I think this is a great idea.  As someone who was brought onboard to help
with documentation as well as coding, I would have a hard time keeping up if
this was a full-time job.  I think it would make a great deal of sense to
work on this for the 2.0 release, since feature creep should be at a minimum
right now anyway..

just my 2 cents...

On Feb 13, 2008 5:18 AM, Emmanuel Lecharny <el...@gmail.com> wrote:

> 이희승 (Trustin Lee) wrote:
> > Oh yeah, that's a good idea.  We have been stepping on the accelerator
> > for a very long time to implement new features and improve performance,
> > so it seems like it's time to take care of stability.
> >
> I tink that MINA 2.0 is the perfect target for that ! Now that 2.0-M1
> has been voted, we can deserve some energy on 2.0-M2 : a 2.0-M1 with
> better coverage, reviewed documentation, tested, with some more
> examples. It will cost time, but I'm sure that the community can provide
> some help ! We have so many users now that everyone of them can also
> give a little bit of time to improve MINA !
>
> For instance, as we are using MINA at Directory, it would be good to
> explain how we are using it (configuration and codec implementation). I
> think that would be helpfull to many users starting with MINA. We will
> switch to MINA 2.0 soon, and we will try to give such kind of
> documentation to the MINA project on the same time.
> > One problem is that most bug reports these days are not easy to
> > reproduce, which means they are related with high concurrency situation
> > and unit tests cannot be the way to find many potential bugs, although
> > CircularQueue issue is probably detectable by a unit test.
> >
> That's true. May be we need some better FAQ for all the users who are
> asking the same questions. Compiling the Users mailing list and
> gathering the most frequent questions can help.
>
> MINA 2.0 is really a great step forward, it deserves the associated
> tests, doc and samples ! May be a "MINA in Action ?" :)
>
> --
> --
> cordialement, regards,
> Emmanuel Lécharny
> www.iktek.com
> directory.apache.org
>
>
>


-- 
--------------------------------
Talent hits a target no one else can hit; Genius hits a target no one else
can see.

Re: Test coverage & documentation in MINA to promote more collaboration (Was: Re: mina and jdk6u4)

Posted by Emmanuel Lecharny <el...@gmail.com>.
이희승 (Trustin Lee) wrote:
> Oh yeah, that's a good idea.  We have been stepping on the accelerator
> for a very long time to implement new features and improve performance,
> so it seems like it's time to take care of stability.
>   
I tink that MINA 2.0 is the perfect target for that ! Now that 2.0-M1 
has been voted, we can deserve some energy on 2.0-M2 : a 2.0-M1 with 
better coverage, reviewed documentation, tested, with some more 
examples. It will cost time, but I'm sure that the community can provide 
some help ! We have so many users now that everyone of them can also 
give a little bit of time to improve MINA !

For instance, as we are using MINA at Directory, it would be good to 
explain how we are using it (configuration and codec implementation). I 
think that would be helpfull to many users starting with MINA. We will 
switch to MINA 2.0 soon, and we will try to give such kind of 
documentation to the MINA project on the same time.
> One problem is that most bug reports these days are not easy to
> reproduce, which means they are related with high concurrency situation
> and unit tests cannot be the way to find many potential bugs, although
> CircularQueue issue is probably detectable by a unit test.
>   
That's true. May be we need some better FAQ for all the users who are 
asking the same questions. Compiling the Users mailing list and 
gathering the most frequent questions can help.

MINA 2.0 is really a great step forward, it deserves the associated 
tests, doc and samples ! May be a "MINA in Action ?" :)

-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Re: Test coverage & documentation in MINA to promote more collaboration (Was: Re: mina and jdk6u4)

Posted by Julien Vermillard <jv...@archean.fr>.
I found some computer parts,I'll try to assemble some kind of server for
running serial test.
Julien

On Wed, 13 Feb 2008 05:03:13 -0500
이희승 "(Trustin Lee)" <tr...@gmail.com> wrote:

> LoL! That would be fantastic. :)
> 
> 2008-02-13 (수), 10:54 +0100, Julien Vermillard 쓰시길:
> > Hi
> > BTW is it possible to have an ASF machine with two serial port
> > wired in loop-back for being able to run automated serial transport
> > tests ?
> > 
> > Julien
> > 
> > On Wed, 13 Feb 2008 04:47:40 -0500
> > "Alex Karasulu" <ak...@apache.org> wrote:
> > 
> > > I can provide such a lab. I just cannot reveal the contributing
> > > party.  If you and others are interested please contact me
> > > offline. We've been trying to prepare a high concurrency
> > > environment for ApacheDS specifically so we can share this with
> > > MINA.  We just need a solid plan for the infrastructure.
> > > 
> > > Alex
> > > 
> > > On Feb 13, 2008 4:18 AM, 이희승 (Trustin Lee) <tr...@gmail.com>
> > > wrote:
> > > 
> > > > Oh yeah, that's a good idea.  We have been stepping on the
> > > > accelerator for a very long time to implement new features and
> > > > improve performance, so it seems like it's time to take care of
> > > > stability.
> > > >
> > > > One problem is that most bug reports these days are not easy to
> > > > reproduce, which means they are related with high concurrency
> > > > situation and unit tests cannot be the way to find many
> > > > potential bugs, although CircularQueue issue is probably
> > > > detectable by a unit test.
> > > >
> > > > The best solution would be to have a kind of regression test lab
> > > > within the ASF so we can run some exhaustive tests preiodically
> > > > and share the facility with other projects like HTTPD and
> > > > Directory.  I don't think it will happen soon though.
> > > >
> > > > Anyways, we need to raise the coverage rate on and on.
> > > >
> > > > 2008-02-13 (수), 03:23 -0500, Alex Karasulu 쓰시길:
> > > > > I've been noticing and hearing many complaints about the
> > > > > amount of tests
> > > > and
> > > > > overall coverage in the MINA code base.  If there was more
> > > > > coverage contributors and committers would feel much more
> > > > > comfortable making
> > > > changes
> > > > > knowing they're not going to break something.
> > > > >
> > > > > At some point we need to stop growing the code base like mad
> > > > > and just
> > > > start
> > > > > documenting and thoroughly testing the code.  Otherwise as we
> > > > > grow the barrier of entry into the heart of MINA especially
> > > > > will increase.
> > > > >
> > > > > Alex
> > > > >
> > > > > On Feb 13, 2008 12:00 AM, 이희승 (Trustin Lee)
> > > > > <tr...@gmail.com> wrote:
> > > > >
> > > > > > 2008-02-01 (금), 13:57 +0100, Emmanuel Lecharny 쓰시길:
> > > > > > > Makoto YUI wrote:
> > > > > > > > I have the same problem to you.
> > > > > > > > I'm using the latest snapshot (
> > > > > > mina-core-2.0.0-M1-20080124.103130-116.jar).
> > > > > > > >
> > > > > > > > | java.lang.ArrayIndexOutOfBoundsException
> > > > > > > > | at
> > > > > > > > org.apache.mina.util.CircularQueue.shrinkIfNeeded(
> > > > CircularQueue.java
> > > > > > :233)
> > > > > > > >
> > > > > > > > This problem caused when newLen is less than the length
> > > > > > > > of System.arraycopy().
> > > > > > > >
> > > > > > > > | Object[] tmp = new Object[newLen];
> > > > > > > > | ..
> > > > > > > > |            if (first < last) {
> > > > > > > > |                System.arraycopy(items, first, tmp, 0,
> > > > > > > > last -
> > > > first);
> > > > > > > > * bug
> > > > > > > > |            } else {
> > > > > > > > |                System.arraycopy(items, first, tmp, 0,
> > > > > > > > oldLen -
> > > > > > first);   *
> > > > > > > > bug
> > > > > > > > |                System.arraycopy(items, 0, tmp, oldLen
> > > > > > > > - first,
> > > > > > last);    *
> > > > > > > > bug
> > > > > > > > |            }
> > > > > > > >
> > > > > > > > It seems to be preferred to use java.util.LinkedList
> > > > > > > > instead of
> > > > custom
> > > > > > > > CircularQueue
> > > > > > > > for messageQueue(s) in
> > > > > > > > AbstractProtocolEncoderOutput/AbstractProtocolDecoderOutput.
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > >
> > > > > > > > Makoto YUI
> > > > > > > >
> > > > > > > I don't think that it's a problem to use our own brewed
> > > > CircularQueue
> > > > > > ...
> > > > > > >
> > > > > > > I looked at the code, and I'm a little bit annoyed that
> > > > > > > there is absolutely no comment at all. There is a clear
> > > > > > > bug somewhere, as you
> > > > got
> > > > > > > a java.lang.ArrayIndexOutOfBoundsException (and many
> > > > > > > thanks for
> > > > having
> > > > > > > posting this mail, btw !!!), but without a knowledge about
> > > > > > > what is
> > > > doing
> > > > > > > this class, it's really difficult to find a fix in 2
> > > > > > > minutes. This should not be the case...
> > > > > > >
> > > > > > > Btw, there is no test cases either...
> > > > > >
> > > > > > I wrote that evil code hehe. :)
> > > > > >
> > > > > > There's test case for CircularQueue in 1.x branch, but it
> > > > > > was removed from the trunk when I replace it with
> > > > > > LinkedList. After then, I realized the CircularQueue
> > > > > > implementation performs better than LinkedList, so I
> > > > > > resurrected it.  However, I forgot to resurrect the test
> > > > > > case together.  Will take care of this when I get back
> > > > > > home. -- what we call human nature is actually human habit
> > > > > > --
> > > > > > http://gleamynode.net/
> > > > > >
> > > > --
> > > > what we call human nature is actually human habit
> > > > --
> > > > http://gleamynode.net/
> > > >

Re: Test coverage & documentation in MINA to promote more collaboration (Was: Re: mina and jdk6u4)

Posted by "이희승 (Trustin Lee)" <tr...@gmail.com>.
LoL! That would be fantastic. :)

2008-02-13 (수), 10:54 +0100, Julien Vermillard 쓰시길:
> Hi
> BTW is it possible to have an ASF machine with two serial port wired in
> loop-back for being able to run automated serial transport tests ?
> 
> Julien
> 
> On Wed, 13 Feb 2008 04:47:40 -0500
> "Alex Karasulu" <ak...@apache.org> wrote:
> 
> > I can provide such a lab. I just cannot reveal the contributing
> > party.  If you and others are interested please contact me offline.
> > We've been trying to prepare a high concurrency environment for
> > ApacheDS specifically so we can share this with MINA.  We just need a
> > solid plan for the infrastructure.
> > 
> > Alex
> > 
> > On Feb 13, 2008 4:18 AM, 이희승 (Trustin Lee) <tr...@gmail.com>
> > wrote:
> > 
> > > Oh yeah, that's a good idea.  We have been stepping on the
> > > accelerator for a very long time to implement new features and
> > > improve performance, so it seems like it's time to take care of
> > > stability.
> > >
> > > One problem is that most bug reports these days are not easy to
> > > reproduce, which means they are related with high concurrency
> > > situation and unit tests cannot be the way to find many potential
> > > bugs, although CircularQueue issue is probably detectable by a unit
> > > test.
> > >
> > > The best solution would be to have a kind of regression test lab
> > > within the ASF so we can run some exhaustive tests preiodically and
> > > share the facility with other projects like HTTPD and Directory.  I
> > > don't think it will happen soon though.
> > >
> > > Anyways, we need to raise the coverage rate on and on.
> > >
> > > 2008-02-13 (수), 03:23 -0500, Alex Karasulu 쓰시길:
> > > > I've been noticing and hearing many complaints about the amount
> > > > of tests
> > > and
> > > > overall coverage in the MINA code base.  If there was more
> > > > coverage contributors and committers would feel much more
> > > > comfortable making
> > > changes
> > > > knowing they're not going to break something.
> > > >
> > > > At some point we need to stop growing the code base like mad and
> > > > just
> > > start
> > > > documenting and thoroughly testing the code.  Otherwise as we
> > > > grow the barrier of entry into the heart of MINA especially will
> > > > increase.
> > > >
> > > > Alex
> > > >
> > > > On Feb 13, 2008 12:00 AM, 이희승 (Trustin Lee)
> > > > <tr...@gmail.com> wrote:
> > > >
> > > > > 2008-02-01 (금), 13:57 +0100, Emmanuel Lecharny 쓰시길:
> > > > > > Makoto YUI wrote:
> > > > > > > I have the same problem to you.
> > > > > > > I'm using the latest snapshot (
> > > > > mina-core-2.0.0-M1-20080124.103130-116.jar).
> > > > > > >
> > > > > > > | java.lang.ArrayIndexOutOfBoundsException
> > > > > > > | at
> > > > > > > org.apache.mina.util.CircularQueue.shrinkIfNeeded(
> > > CircularQueue.java
> > > > > :233)
> > > > > > >
> > > > > > > This problem caused when newLen is less than the length of
> > > > > > > System.arraycopy().
> > > > > > >
> > > > > > > | Object[] tmp = new Object[newLen];
> > > > > > > | ..
> > > > > > > |            if (first < last) {
> > > > > > > |                System.arraycopy(items, first, tmp, 0,
> > > > > > > last -
> > > first);
> > > > > > > * bug
> > > > > > > |            } else {
> > > > > > > |                System.arraycopy(items, first, tmp, 0,
> > > > > > > oldLen -
> > > > > first);   *
> > > > > > > bug
> > > > > > > |                System.arraycopy(items, 0, tmp, oldLen -
> > > > > > > first,
> > > > > last);    *
> > > > > > > bug
> > > > > > > |            }
> > > > > > >
> > > > > > > It seems to be preferred to use java.util.LinkedList
> > > > > > > instead of
> > > custom
> > > > > > > CircularQueue
> > > > > > > for messageQueue(s) in
> > > > > > > AbstractProtocolEncoderOutput/AbstractProtocolDecoderOutput.
> > > > > > >
> > > > > > > Thanks,
> > > > > > >
> > > > > > > Makoto YUI
> > > > > > >
> > > > > > I don't think that it's a problem to use our own brewed
> > > CircularQueue
> > > > > ...
> > > > > >
> > > > > > I looked at the code, and I'm a little bit annoyed that there
> > > > > > is absolutely no comment at all. There is a clear bug
> > > > > > somewhere, as you
> > > got
> > > > > > a java.lang.ArrayIndexOutOfBoundsException (and many thanks
> > > > > > for
> > > having
> > > > > > posting this mail, btw !!!), but without a knowledge about
> > > > > > what is
> > > doing
> > > > > > this class, it's really difficult to find a fix in 2 minutes.
> > > > > > This should not be the case...
> > > > > >
> > > > > > Btw, there is no test cases either...
> > > > >
> > > > > I wrote that evil code hehe. :)
> > > > >
> > > > > There's test case for CircularQueue in 1.x branch, but it was
> > > > > removed from the trunk when I replace it with LinkedList.
> > > > > After then, I realized the CircularQueue implementation
> > > > > performs better than LinkedList, so I resurrected it.  However,
> > > > > I forgot to resurrect the test case together.  Will take care
> > > > > of this when I get back home. --
> > > > > what we call human nature is actually human habit
> > > > > --
> > > > > http://gleamynode.net/
> > > > >
> > > --
> > > what we call human nature is actually human habit
> > > --
> > > http://gleamynode.net/
> > >
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: Test coverage & documentation in MINA to promote more collaboration (Was: Re: mina and jdk6u4)

Posted by Julien Vermillard <jv...@archean.fr>.
Hi
BTW is it possible to have an ASF machine with two serial port wired in
loop-back for being able to run automated serial transport tests ?

Julien

On Wed, 13 Feb 2008 04:47:40 -0500
"Alex Karasulu" <ak...@apache.org> wrote:

> I can provide such a lab. I just cannot reveal the contributing
> party.  If you and others are interested please contact me offline.
> We've been trying to prepare a high concurrency environment for
> ApacheDS specifically so we can share this with MINA.  We just need a
> solid plan for the infrastructure.
> 
> Alex
> 
> On Feb 13, 2008 4:18 AM, 이희승 (Trustin Lee) <tr...@gmail.com>
> wrote:
> 
> > Oh yeah, that's a good idea.  We have been stepping on the
> > accelerator for a very long time to implement new features and
> > improve performance, so it seems like it's time to take care of
> > stability.
> >
> > One problem is that most bug reports these days are not easy to
> > reproduce, which means they are related with high concurrency
> > situation and unit tests cannot be the way to find many potential
> > bugs, although CircularQueue issue is probably detectable by a unit
> > test.
> >
> > The best solution would be to have a kind of regression test lab
> > within the ASF so we can run some exhaustive tests preiodically and
> > share the facility with other projects like HTTPD and Directory.  I
> > don't think it will happen soon though.
> >
> > Anyways, we need to raise the coverage rate on and on.
> >
> > 2008-02-13 (수), 03:23 -0500, Alex Karasulu 쓰시길:
> > > I've been noticing and hearing many complaints about the amount
> > > of tests
> > and
> > > overall coverage in the MINA code base.  If there was more
> > > coverage contributors and committers would feel much more
> > > comfortable making
> > changes
> > > knowing they're not going to break something.
> > >
> > > At some point we need to stop growing the code base like mad and
> > > just
> > start
> > > documenting and thoroughly testing the code.  Otherwise as we
> > > grow the barrier of entry into the heart of MINA especially will
> > > increase.
> > >
> > > Alex
> > >
> > > On Feb 13, 2008 12:00 AM, 이희승 (Trustin Lee)
> > > <tr...@gmail.com> wrote:
> > >
> > > > 2008-02-01 (금), 13:57 +0100, Emmanuel Lecharny 쓰시길:
> > > > > Makoto YUI wrote:
> > > > > > I have the same problem to you.
> > > > > > I'm using the latest snapshot (
> > > > mina-core-2.0.0-M1-20080124.103130-116.jar).
> > > > > >
> > > > > > | java.lang.ArrayIndexOutOfBoundsException
> > > > > > | at
> > > > > > org.apache.mina.util.CircularQueue.shrinkIfNeeded(
> > CircularQueue.java
> > > > :233)
> > > > > >
> > > > > > This problem caused when newLen is less than the length of
> > > > > > System.arraycopy().
> > > > > >
> > > > > > | Object[] tmp = new Object[newLen];
> > > > > > | ..
> > > > > > |            if (first < last) {
> > > > > > |                System.arraycopy(items, first, tmp, 0,
> > > > > > last -
> > first);
> > > > > > * bug
> > > > > > |            } else {
> > > > > > |                System.arraycopy(items, first, tmp, 0,
> > > > > > oldLen -
> > > > first);   *
> > > > > > bug
> > > > > > |                System.arraycopy(items, 0, tmp, oldLen -
> > > > > > first,
> > > > last);    *
> > > > > > bug
> > > > > > |            }
> > > > > >
> > > > > > It seems to be preferred to use java.util.LinkedList
> > > > > > instead of
> > custom
> > > > > > CircularQueue
> > > > > > for messageQueue(s) in
> > > > > > AbstractProtocolEncoderOutput/AbstractProtocolDecoderOutput.
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > Makoto YUI
> > > > > >
> > > > > I don't think that it's a problem to use our own brewed
> > CircularQueue
> > > > ...
> > > > >
> > > > > I looked at the code, and I'm a little bit annoyed that there
> > > > > is absolutely no comment at all. There is a clear bug
> > > > > somewhere, as you
> > got
> > > > > a java.lang.ArrayIndexOutOfBoundsException (and many thanks
> > > > > for
> > having
> > > > > posting this mail, btw !!!), but without a knowledge about
> > > > > what is
> > doing
> > > > > this class, it's really difficult to find a fix in 2 minutes.
> > > > > This should not be the case...
> > > > >
> > > > > Btw, there is no test cases either...
> > > >
> > > > I wrote that evil code hehe. :)
> > > >
> > > > There's test case for CircularQueue in 1.x branch, but it was
> > > > removed from the trunk when I replace it with LinkedList.
> > > > After then, I realized the CircularQueue implementation
> > > > performs better than LinkedList, so I resurrected it.  However,
> > > > I forgot to resurrect the test case together.  Will take care
> > > > of this when I get back home. --
> > > > what we call human nature is actually human habit
> > > > --
> > > > http://gleamynode.net/
> > > >
> > --
> > what we call human nature is actually human habit
> > --
> > http://gleamynode.net/
> >

Re: Test coverage & documentation in MINA to promote more collaboration (Was: Re: mina and jdk6u4)

Posted by Mike Heath <mh...@apache.org>.
Mark Webb wrote:
> How many machines would we need?  Is this something that could be
> virtualized?

With Amazon EC2 you create as many instances as you want so it would
give us a great deal of flexibility.  Each EC2 instance is virtualized
so you're not getting exclusive access to a machine but you do get a
certain guaranteed level of service.  You can read more about EC2 here,
http://www.amazon.com/gp/browse.html?node=201590011

-Mike

<snip>

Re: Test coverage & documentation in MINA to promote more collaboration (Was: Re: mina and jdk6u4)

Posted by Mark Webb <el...@gmail.com>.
How many machines would we need?  Is this something that could be
virtualized?

On Feb 13, 2008 2:13 PM, Alex Karasulu <ak...@apache.org> wrote:

> Sweeeeet.  Lez do it - keep us posted on this.
>
> Alex
>
> On Feb 13, 2008 12:53 PM, Mike Heath <mh...@apache.org> wrote:
>
> > I too would love to see a comprehensive test suite for MINA and I like
> > the direction this thread is headed.
> >
> > I have been thinking for a couple of months now that using something
> > like Amazon's EC2 would be a great test bed.  (Except that we couldn't
> > use EC2 to test the serial transport. :( )  It would be easy to automate
> > firing up any number of EC2 instances to run different load tests.
> >
> > Amazon donates EC2 time to BYU, my beloved alma matter.  I have a
> > contact at Amazon.  I could him ask about getting EC2 time donated to
> > the ASF.  If there's interest in that, I'll go ahead and fire off an
> > email.
> >
> > -Mike
> >
> > Alex Karasulu wrote:
> > > I can provide such a lab. I just cannot reveal the contributing party.
> >  If
> > > you and others are interested please contact me offline.  We've been
> > trying
> > > to prepare a high concurrency environment for ApacheDS specifically so
> > we
> > > can share this with MINA.  We just need a solid plan for the
> > > infrastructure.
> > >
> > > Alex
> > >
> > > On Feb 13, 2008 4:18 AM, 이희승 (Trustin Lee) <tr...@gmail.com> wrote:
> > >
> > >> Oh yeah, that's a good idea.  We have been stepping on the
> accelerator
> > >> for a very long time to implement new features and improve
> performance,
> > >> so it seems like it's time to take care of stability.
> > >>
> > >> One problem is that most bug reports these days are not easy to
> > >> reproduce, which means they are related with high concurrency
> situation
> > >> and unit tests cannot be the way to find many potential bugs,
> although
> > >> CircularQueue issue is probably detectable by a unit test.
> > >>
> > >> The best solution would be to have a kind of regression test lab
> within
> > >> the ASF so we can run some exhaustive tests preiodically and share
> the
> > >> facility with other projects like HTTPD and Directory.  I don't think
> > it
> > >> will happen soon though.
> > >>
> > >> Anyways, we need to raise the coverage rate on and on.
> > >>
> > >> 2008-02-13 (수), 03:23 -0500, Alex Karasulu 쓰시길:
> > >>> I've been noticing and hearing many complaints about the amount of
> > tests
> > >> and
> > >>> overall coverage in the MINA code base.  If there was more coverage
> > >>> contributors and committers would feel much more comfortable making
> > >> changes
> > >>> knowing they're not going to break something.
> > >>>
> > >>> At some point we need to stop growing the code base like mad and
> just
> > >> start
> > >>> documenting and thoroughly testing the code.  Otherwise as we grow
> the
> > >>> barrier of entry into the heart of MINA especially will increase.
> > >>>
> > >>> Alex
> > >>>
> > >>> On Feb 13, 2008 12:00 AM, 이희승 (Trustin Lee) <tr...@gmail.com>
> wrote:
> > >>>
> > >>>> 2008-02-01 (금), 13:57 +0100, Emmanuel Lecharny 쓰시길:
> > >>>>> Makoto YUI wrote:
> > >>>>>> I have the same problem to you.
> > >>>>>> I'm using the latest snapshot (
> > >>>> mina-core-2.0.0-M1-20080124.103130-116.jar).
> > >>>>>> | java.lang.ArrayIndexOutOfBoundsException
> > >>>>>> | at
> > >>>>>> org.apache.mina.util.CircularQueue.shrinkIfNeeded(
> > >> CircularQueue.java
> > >>>> :233)
> > >>>>>> This problem caused when newLen is less than the length of
> > >>>>>> System.arraycopy().
> > >>>>>>
> > >>>>>> | Object[] tmp = new Object[newLen];
> > >>>>>> | ..
> > >>>>>> |            if (first < last) {
> > >>>>>> |                System.arraycopy(items, first, tmp, 0, last -
> > >> first);
> > >>>>>> * bug
> > >>>>>> |            } else {
> > >>>>>> |                System.arraycopy(items, first, tmp, 0, oldLen -
> > >>>> first);   *
> > >>>>>> bug
> > >>>>>> |                System.arraycopy(items, 0, tmp, oldLen - first,
> > >>>> last);    *
> > >>>>>> bug
> > >>>>>> |            }
> > >>>>>>
> > >>>>>> It seems to be preferred to use java.util.LinkedList instead of
> > >> custom
> > >>>>>> CircularQueue
> > >>>>>> for messageQueue(s) in
> > >>>>>> AbstractProtocolEncoderOutput/AbstractProtocolDecoderOutput.
> > >>>>>>
> > >>>>>> Thanks,
> > >>>>>>
> > >>>>>> Makoto YUI
> > >>>>>>
> > >>>>> I don't think that it's a problem to use our own brewed
> > >> CircularQueue
> > >>>> ...
> > >>>>> I looked at the code, and I'm a little bit annoyed that there is
> > >>>>> absolutely no comment at all. There is a clear bug somewhere, as
> you
> > >> got
> > >>>>> a java.lang.ArrayIndexOutOfBoundsException (and many thanks for
> > >> having
> > >>>>> posting this mail, btw !!!), but without a knowledge about what is
> > >> doing
> > >>>>> this class, it's really difficult to find a fix in 2 minutes. This
> > >>>>> should not be the case...
> > >>>>>
> > >>>>> Btw, there is no test cases either...
> > >>>> I wrote that evil code hehe. :)
> > >>>>
> > >>>> There's test case for CircularQueue in 1.x branch, but it was
> removed
> > >>>> from the trunk when I replace it with LinkedList.  After then, I
> > >>>> realized the CircularQueue implementation performs better than
> > >>>> LinkedList, so I resurrected it.  However, I forgot to resurrect
> the
> > >>>> test case together.  Will take care of this when I get back home.
> > >>>> --
> > >>>> what we call human nature is actually human habit
> > >>>> --
> > >>>> http://gleamynode.net/
> > >>>>
> > >> --
> > >> what we call human nature is actually human habit
> > >> --
> > >> http://gleamynode.net/
> > >>
> >
> >
>



-- 
--------------------------------
Talent hits a target no one else can hit; Genius hits a target no one else
can see.

Re: Test coverage & documentation in MINA to promote more collaboration (Was: Re: mina and jdk6u4)

Posted by Alex Karasulu <ak...@apache.org>.
Sweeeeet.  Lez do it - keep us posted on this.

Alex

On Feb 13, 2008 12:53 PM, Mike Heath <mh...@apache.org> wrote:

> I too would love to see a comprehensive test suite for MINA and I like
> the direction this thread is headed.
>
> I have been thinking for a couple of months now that using something
> like Amazon's EC2 would be a great test bed.  (Except that we couldn't
> use EC2 to test the serial transport. :( )  It would be easy to automate
> firing up any number of EC2 instances to run different load tests.
>
> Amazon donates EC2 time to BYU, my beloved alma matter.  I have a
> contact at Amazon.  I could him ask about getting EC2 time donated to
> the ASF.  If there's interest in that, I'll go ahead and fire off an
> email.
>
> -Mike
>
> Alex Karasulu wrote:
> > I can provide such a lab. I just cannot reveal the contributing party.
>  If
> > you and others are interested please contact me offline.  We've been
> trying
> > to prepare a high concurrency environment for ApacheDS specifically so
> we
> > can share this with MINA.  We just need a solid plan for the
> > infrastructure.
> >
> > Alex
> >
> > On Feb 13, 2008 4:18 AM, 이희승 (Trustin Lee) <tr...@gmail.com> wrote:
> >
> >> Oh yeah, that's a good idea.  We have been stepping on the accelerator
> >> for a very long time to implement new features and improve performance,
> >> so it seems like it's time to take care of stability.
> >>
> >> One problem is that most bug reports these days are not easy to
> >> reproduce, which means they are related with high concurrency situation
> >> and unit tests cannot be the way to find many potential bugs, although
> >> CircularQueue issue is probably detectable by a unit test.
> >>
> >> The best solution would be to have a kind of regression test lab within
> >> the ASF so we can run some exhaustive tests preiodically and share the
> >> facility with other projects like HTTPD and Directory.  I don't think
> it
> >> will happen soon though.
> >>
> >> Anyways, we need to raise the coverage rate on and on.
> >>
> >> 2008-02-13 (수), 03:23 -0500, Alex Karasulu 쓰시길:
> >>> I've been noticing and hearing many complaints about the amount of
> tests
> >> and
> >>> overall coverage in the MINA code base.  If there was more coverage
> >>> contributors and committers would feel much more comfortable making
> >> changes
> >>> knowing they're not going to break something.
> >>>
> >>> At some point we need to stop growing the code base like mad and just
> >> start
> >>> documenting and thoroughly testing the code.  Otherwise as we grow the
> >>> barrier of entry into the heart of MINA especially will increase.
> >>>
> >>> Alex
> >>>
> >>> On Feb 13, 2008 12:00 AM, 이희승 (Trustin Lee) <tr...@gmail.com> wrote:
> >>>
> >>>> 2008-02-01 (금), 13:57 +0100, Emmanuel Lecharny 쓰시길:
> >>>>> Makoto YUI wrote:
> >>>>>> I have the same problem to you.
> >>>>>> I'm using the latest snapshot (
> >>>> mina-core-2.0.0-M1-20080124.103130-116.jar).
> >>>>>> | java.lang.ArrayIndexOutOfBoundsException
> >>>>>> | at
> >>>>>> org.apache.mina.util.CircularQueue.shrinkIfNeeded(
> >> CircularQueue.java
> >>>> :233)
> >>>>>> This problem caused when newLen is less than the length of
> >>>>>> System.arraycopy().
> >>>>>>
> >>>>>> | Object[] tmp = new Object[newLen];
> >>>>>> | ..
> >>>>>> |            if (first < last) {
> >>>>>> |                System.arraycopy(items, first, tmp, 0, last -
> >> first);
> >>>>>> * bug
> >>>>>> |            } else {
> >>>>>> |                System.arraycopy(items, first, tmp, 0, oldLen -
> >>>> first);   *
> >>>>>> bug
> >>>>>> |                System.arraycopy(items, 0, tmp, oldLen - first,
> >>>> last);    *
> >>>>>> bug
> >>>>>> |            }
> >>>>>>
> >>>>>> It seems to be preferred to use java.util.LinkedList instead of
> >> custom
> >>>>>> CircularQueue
> >>>>>> for messageQueue(s) in
> >>>>>> AbstractProtocolEncoderOutput/AbstractProtocolDecoderOutput.
> >>>>>>
> >>>>>> Thanks,
> >>>>>>
> >>>>>> Makoto YUI
> >>>>>>
> >>>>> I don't think that it's a problem to use our own brewed
> >> CircularQueue
> >>>> ...
> >>>>> I looked at the code, and I'm a little bit annoyed that there is
> >>>>> absolutely no comment at all. There is a clear bug somewhere, as you
> >> got
> >>>>> a java.lang.ArrayIndexOutOfBoundsException (and many thanks for
> >> having
> >>>>> posting this mail, btw !!!), but without a knowledge about what is
> >> doing
> >>>>> this class, it's really difficult to find a fix in 2 minutes. This
> >>>>> should not be the case...
> >>>>>
> >>>>> Btw, there is no test cases either...
> >>>> I wrote that evil code hehe. :)
> >>>>
> >>>> There's test case for CircularQueue in 1.x branch, but it was removed
> >>>> from the trunk when I replace it with LinkedList.  After then, I
> >>>> realized the CircularQueue implementation performs better than
> >>>> LinkedList, so I resurrected it.  However, I forgot to resurrect the
> >>>> test case together.  Will take care of this when I get back home.
> >>>> --
> >>>> what we call human nature is actually human habit
> >>>> --
> >>>> http://gleamynode.net/
> >>>>
> >> --
> >> what we call human nature is actually human habit
> >> --
> >> http://gleamynode.net/
> >>
>
>

Re: Test coverage & documentation in MINA to promote more collaboration (Was: Re: mina and jdk6u4)

Posted by Mike Heath <mh...@apache.org>.
I too would love to see a comprehensive test suite for MINA and I like
the direction this thread is headed.

I have been thinking for a couple of months now that using something
like Amazon's EC2 would be a great test bed.  (Except that we couldn't
use EC2 to test the serial transport. :( )  It would be easy to automate
firing up any number of EC2 instances to run different load tests.

Amazon donates EC2 time to BYU, my beloved alma matter.  I have a
contact at Amazon.  I could him ask about getting EC2 time donated to
the ASF.  If there's interest in that, I'll go ahead and fire off an email.

-Mike

Alex Karasulu wrote:
> I can provide such a lab. I just cannot reveal the contributing party.  If
> you and others are interested please contact me offline.  We've been trying
> to prepare a high concurrency environment for ApacheDS specifically so we
> can share this with MINA.  We just need a solid plan for the
> infrastructure.
> 
> Alex
> 
> On Feb 13, 2008 4:18 AM, 이희승 (Trustin Lee) <tr...@gmail.com> wrote:
> 
>> Oh yeah, that's a good idea.  We have been stepping on the accelerator
>> for a very long time to implement new features and improve performance,
>> so it seems like it's time to take care of stability.
>>
>> One problem is that most bug reports these days are not easy to
>> reproduce, which means they are related with high concurrency situation
>> and unit tests cannot be the way to find many potential bugs, although
>> CircularQueue issue is probably detectable by a unit test.
>>
>> The best solution would be to have a kind of regression test lab within
>> the ASF so we can run some exhaustive tests preiodically and share the
>> facility with other projects like HTTPD and Directory.  I don't think it
>> will happen soon though.
>>
>> Anyways, we need to raise the coverage rate on and on.
>>
>> 2008-02-13 (수), 03:23 -0500, Alex Karasulu 쓰시길:
>>> I've been noticing and hearing many complaints about the amount of tests
>> and
>>> overall coverage in the MINA code base.  If there was more coverage
>>> contributors and committers would feel much more comfortable making
>> changes
>>> knowing they're not going to break something.
>>>
>>> At some point we need to stop growing the code base like mad and just
>> start
>>> documenting and thoroughly testing the code.  Otherwise as we grow the
>>> barrier of entry into the heart of MINA especially will increase.
>>>
>>> Alex
>>>
>>> On Feb 13, 2008 12:00 AM, 이희승 (Trustin Lee) <tr...@gmail.com> wrote:
>>>
>>>> 2008-02-01 (금), 13:57 +0100, Emmanuel Lecharny 쓰시길:
>>>>> Makoto YUI wrote:
>>>>>> I have the same problem to you.
>>>>>> I'm using the latest snapshot (
>>>> mina-core-2.0.0-M1-20080124.103130-116.jar).
>>>>>> | java.lang.ArrayIndexOutOfBoundsException
>>>>>> | at
>>>>>> org.apache.mina.util.CircularQueue.shrinkIfNeeded(
>> CircularQueue.java
>>>> :233)
>>>>>> This problem caused when newLen is less than the length of
>>>>>> System.arraycopy().
>>>>>>
>>>>>> | Object[] tmp = new Object[newLen];
>>>>>> | ..
>>>>>> |            if (first < last) {
>>>>>> |                System.arraycopy(items, first, tmp, 0, last -
>> first);
>>>>>> * bug
>>>>>> |            } else {
>>>>>> |                System.arraycopy(items, first, tmp, 0, oldLen -
>>>> first);   *
>>>>>> bug
>>>>>> |                System.arraycopy(items, 0, tmp, oldLen - first,
>>>> last);    *
>>>>>> bug
>>>>>> |            }
>>>>>>
>>>>>> It seems to be preferred to use java.util.LinkedList instead of
>> custom
>>>>>> CircularQueue
>>>>>> for messageQueue(s) in
>>>>>> AbstractProtocolEncoderOutput/AbstractProtocolDecoderOutput.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Makoto YUI
>>>>>>
>>>>> I don't think that it's a problem to use our own brewed
>> CircularQueue
>>>> ...
>>>>> I looked at the code, and I'm a little bit annoyed that there is
>>>>> absolutely no comment at all. There is a clear bug somewhere, as you
>> got
>>>>> a java.lang.ArrayIndexOutOfBoundsException (and many thanks for
>> having
>>>>> posting this mail, btw !!!), but without a knowledge about what is
>> doing
>>>>> this class, it's really difficult to find a fix in 2 minutes. This
>>>>> should not be the case...
>>>>>
>>>>> Btw, there is no test cases either...
>>>> I wrote that evil code hehe. :)
>>>>
>>>> There's test case for CircularQueue in 1.x branch, but it was removed
>>>> from the trunk when I replace it with LinkedList.  After then, I
>>>> realized the CircularQueue implementation performs better than
>>>> LinkedList, so I resurrected it.  However, I forgot to resurrect the
>>>> test case together.  Will take care of this when I get back home.
>>>> --
>>>> what we call human nature is actually human habit
>>>> --
>>>> http://gleamynode.net/
>>>>
>> --
>> what we call human nature is actually human habit
>> --
>> http://gleamynode.net/
>>


Re: Test coverage & documentation in MINA to promote more collaboration (Was: Re: mina and jdk6u4)

Posted by Alex Karasulu <ak...@apache.org>.
I can provide such a lab. I just cannot reveal the contributing party.  If
you and others are interested please contact me offline.  We've been trying
to prepare a high concurrency environment for ApacheDS specifically so we
can share this with MINA.  We just need a solid plan for the
infrastructure.

Alex

On Feb 13, 2008 4:18 AM, 이희승 (Trustin Lee) <tr...@gmail.com> wrote:

> Oh yeah, that's a good idea.  We have been stepping on the accelerator
> for a very long time to implement new features and improve performance,
> so it seems like it's time to take care of stability.
>
> One problem is that most bug reports these days are not easy to
> reproduce, which means they are related with high concurrency situation
> and unit tests cannot be the way to find many potential bugs, although
> CircularQueue issue is probably detectable by a unit test.
>
> The best solution would be to have a kind of regression test lab within
> the ASF so we can run some exhaustive tests preiodically and share the
> facility with other projects like HTTPD and Directory.  I don't think it
> will happen soon though.
>
> Anyways, we need to raise the coverage rate on and on.
>
> 2008-02-13 (수), 03:23 -0500, Alex Karasulu 쓰시길:
> > I've been noticing and hearing many complaints about the amount of tests
> and
> > overall coverage in the MINA code base.  If there was more coverage
> > contributors and committers would feel much more comfortable making
> changes
> > knowing they're not going to break something.
> >
> > At some point we need to stop growing the code base like mad and just
> start
> > documenting and thoroughly testing the code.  Otherwise as we grow the
> > barrier of entry into the heart of MINA especially will increase.
> >
> > Alex
> >
> > On Feb 13, 2008 12:00 AM, 이희승 (Trustin Lee) <tr...@gmail.com> wrote:
> >
> > > 2008-02-01 (금), 13:57 +0100, Emmanuel Lecharny 쓰시길:
> > > > Makoto YUI wrote:
> > > > > I have the same problem to you.
> > > > > I'm using the latest snapshot (
> > > mina-core-2.0.0-M1-20080124.103130-116.jar).
> > > > >
> > > > > | java.lang.ArrayIndexOutOfBoundsException
> > > > > | at
> > > > > org.apache.mina.util.CircularQueue.shrinkIfNeeded(
> CircularQueue.java
> > > :233)
> > > > >
> > > > > This problem caused when newLen is less than the length of
> > > > > System.arraycopy().
> > > > >
> > > > > | Object[] tmp = new Object[newLen];
> > > > > | ..
> > > > > |            if (first < last) {
> > > > > |                System.arraycopy(items, first, tmp, 0, last -
> first);
> > > > > * bug
> > > > > |            } else {
> > > > > |                System.arraycopy(items, first, tmp, 0, oldLen -
> > > first);   *
> > > > > bug
> > > > > |                System.arraycopy(items, 0, tmp, oldLen - first,
> > > last);    *
> > > > > bug
> > > > > |            }
> > > > >
> > > > > It seems to be preferred to use java.util.LinkedList instead of
> custom
> > > > > CircularQueue
> > > > > for messageQueue(s) in
> > > > > AbstractProtocolEncoderOutput/AbstractProtocolDecoderOutput.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Makoto YUI
> > > > >
> > > > I don't think that it's a problem to use our own brewed
> CircularQueue
> > > ...
> > > >
> > > > I looked at the code, and I'm a little bit annoyed that there is
> > > > absolutely no comment at all. There is a clear bug somewhere, as you
> got
> > > > a java.lang.ArrayIndexOutOfBoundsException (and many thanks for
> having
> > > > posting this mail, btw !!!), but without a knowledge about what is
> doing
> > > > this class, it's really difficult to find a fix in 2 minutes. This
> > > > should not be the case...
> > > >
> > > > Btw, there is no test cases either...
> > >
> > > I wrote that evil code hehe. :)
> > >
> > > There's test case for CircularQueue in 1.x branch, but it was removed
> > > from the trunk when I replace it with LinkedList.  After then, I
> > > realized the CircularQueue implementation performs better than
> > > LinkedList, so I resurrected it.  However, I forgot to resurrect the
> > > test case together.  Will take care of this when I get back home.
> > > --
> > > what we call human nature is actually human habit
> > > --
> > > http://gleamynode.net/
> > >
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
>

Re: Test coverage & documentation in MINA to promote more collaboration (Was: Re: mina and jdk6u4)

Posted by "이희승 (Trustin Lee)" <tr...@gmail.com>.
Oh yeah, that's a good idea.  We have been stepping on the accelerator
for a very long time to implement new features and improve performance,
so it seems like it's time to take care of stability.

One problem is that most bug reports these days are not easy to
reproduce, which means they are related with high concurrency situation
and unit tests cannot be the way to find many potential bugs, although
CircularQueue issue is probably detectable by a unit test.

The best solution would be to have a kind of regression test lab within
the ASF so we can run some exhaustive tests preiodically and share the
facility with other projects like HTTPD and Directory.  I don't think it
will happen soon though.

Anyways, we need to raise the coverage rate on and on.

2008-02-13 (수), 03:23 -0500, Alex Karasulu 쓰시길:
> I've been noticing and hearing many complaints about the amount of tests and
> overall coverage in the MINA code base.  If there was more coverage
> contributors and committers would feel much more comfortable making changes
> knowing they're not going to break something.
> 
> At some point we need to stop growing the code base like mad and just start
> documenting and thoroughly testing the code.  Otherwise as we grow the
> barrier of entry into the heart of MINA especially will increase.
> 
> Alex
> 
> On Feb 13, 2008 12:00 AM, 이희승 (Trustin Lee) <tr...@gmail.com> wrote:
> 
> > 2008-02-01 (금), 13:57 +0100, Emmanuel Lecharny 쓰시길:
> > > Makoto YUI wrote:
> > > > I have the same problem to you.
> > > > I'm using the latest snapshot (
> > mina-core-2.0.0-M1-20080124.103130-116.jar).
> > > >
> > > > | java.lang.ArrayIndexOutOfBoundsException
> > > > | at
> > > > org.apache.mina.util.CircularQueue.shrinkIfNeeded(CircularQueue.java
> > :233)
> > > >
> > > > This problem caused when newLen is less than the length of
> > > > System.arraycopy().
> > > >
> > > > | Object[] tmp = new Object[newLen];
> > > > | ..
> > > > |            if (first < last) {
> > > > |                System.arraycopy(items, first, tmp, 0, last - first);
> > > > * bug
> > > > |            } else {
> > > > |                System.arraycopy(items, first, tmp, 0, oldLen -
> > first);   *
> > > > bug
> > > > |                System.arraycopy(items, 0, tmp, oldLen - first,
> > last);    *
> > > > bug
> > > > |            }
> > > >
> > > > It seems to be preferred to use java.util.LinkedList instead of custom
> > > > CircularQueue
> > > > for messageQueue(s) in
> > > > AbstractProtocolEncoderOutput/AbstractProtocolDecoderOutput.
> > > >
> > > > Thanks,
> > > >
> > > > Makoto YUI
> > > >
> > > I don't think that it's a problem to use our own brewed CircularQueue
> > ...
> > >
> > > I looked at the code, and I'm a little bit annoyed that there is
> > > absolutely no comment at all. There is a clear bug somewhere, as you got
> > > a java.lang.ArrayIndexOutOfBoundsException (and many thanks for having
> > > posting this mail, btw !!!), but without a knowledge about what is doing
> > > this class, it's really difficult to find a fix in 2 minutes. This
> > > should not be the case...
> > >
> > > Btw, there is no test cases either...
> >
> > I wrote that evil code hehe. :)
> >
> > There's test case for CircularQueue in 1.x branch, but it was removed
> > from the trunk when I replace it with LinkedList.  After then, I
> > realized the CircularQueue implementation performs better than
> > LinkedList, so I resurrected it.  However, I forgot to resurrect the
> > test case together.  Will take care of this when I get back home.
> > --
> > what we call human nature is actually human habit
> > --
> > http://gleamynode.net/
> >
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/