You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Noel J. Bergman" <no...@devtech.com> on 2006/11/13 02:20:38 UTC

Back to the unit testing discussion (not emacs, etc.)

Jürgen Hoffmann wrote:

> > > But please stop complaining about how long Unit Tests take,
> > You might notice that Danny and others also commented on the issue, and
no
> > one disagreed that it was a concern.
> I think Testing is very important.

So do I.  That's why I added run-unit-tests to the dist target.  And why I
added support for running specific tests during development --- so that they
would be run because it is convenient to do so, rather than skipped because
running them is onerous.

> I personally dislike partial testing, because you might miss certain
> areas of the code which were affected by a change

As you might have noticed from my discussion with Danny, I agree.  That's
why a dist build includes a clean first and a full run of the test suite.
And why I expressed concern about relying on partial tests based upon
presumed dependencies.

What I complained about was suggestion of adding the full unit test suite to
the basic compile/link target.  And that has nothing to do with IDEs, since
the IDE users talked about how they can do development without being
burdened by having to run tests.  Which appears to defeat the purpose in the
first place.

> that is, what I like about you. You complain a lot, but are not
> afraid to tackle a given problem alone ;-)

Someone has to.  ;-)

> I do not know if it is possible to fake a remote IP while doing local
> connections within Java

We have a full class A subnet (127/8) to play with.  We cannot do the
network configuration portably, nor in Java, but we could:

  loop x:
    loop y:
      loop z:
        UNIX: assign lo:0 to 127.x.y.z
        Java: connect from 127.x.y.z (lo:0) to localhost (lo)
      endloop
    endloop
  endloop

We'd also need a DNS server (or just /etc/hosts) to provide a unique name
for each IP.  I don't know if this is still high on anyone's priority list,
but that's as simple a solution as I've come up with so far.

	--- Noel



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: Back to the unit testing discussion (not emacs, etc.)

Posted by Stefano Bagnara <ap...@bago.org>.
I think that it won't help us to create unit tests for the JVM ;-)

A similar test would not prevent us from using again InetAddress the 
wrong way, so we don't need it.

If Noel investigated on it and made sure that we misused the InetAddress 
cache it is enough for me: we *misused* the InetAddress and probably 
this happened because of a really bad default in the JVM.

This test imho would give us the same improvement we could get from a 
test that put objects into a LinkedList until an OOM is thrown: none but 
proving that the JVM has the OOM exception and that the LinkedList uses 
strong references.

Stefano

Noel J. Bergman wrote:
> Jürgen Hoffmann wrote:
>> I do not know if it is possible to fake a remote IP while doing local
>> connections within Java
> 
> We have a full class A subnet (127/8) to play with.  We cannot do the
> network configuration portably, nor in Java, but we could:
> 
>   loop x:
>     loop y:
>       loop z:
>         UNIX: assign lo:0 to 127.x.y.z
>         Java: connect from 127.x.y.z (lo:0) to localhost (lo)
>       endloop
>     endloop
>   endloop
> 
> We'd also need a DNS server (or just /etc/hosts) to provide a unique name
> for each IP.  I don't know if this is still high on anyone's priority list,
> but that's as simple a solution as I've come up with so far.
> 
> 	--- Noel



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org