You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Stefan Zoerner <st...@labeo.de> on 2007/09/30 18:54:44 UTC

NTP integraion test added (was Re: [ApacheDS] Mini-roadmap for protocol work)

Emmanuel Lecharny wrote:
>> * Should I create the tests in Big Bang or the 1.5 trunk?
> 
> Add them in trunk, because we need them in trunk, but as we will merge
> them with bigbang and the way out, at the end of the day, it makes no
> difference...

Thanks Emmanuel!

I have added a simple integration test for the NTP server here
http://svn.apache.org/viewvc?view=rev&revision=580746

It simply starts it up in the setup method and checks the current time 
with the Apache Net NTP client (class NTPUDPClient).

I will continue to add tests, but have to dive into the implementation 
first ... And my NTP knowledge has to improve as well ...

Greetings, Stefan





Re: NTP integraion test added (was Re: [ApacheDS] Mini-roadmap for protocol work)

Posted by Stefan Zoerner <st...@labeo.de>.
Hi Enrique!

Enrique Rodriguez wrote:
> This is a really nice test.  In particular, it fills a gap between
> unit tests and the integration tests in server-unit, providing full
> server tests, including codecs.  The tests I added for Kerberos tested
> at the IoHandler level and thus did not test the codecs.  I will start
> to use something more like what Stefan worked out for the other
> protocols.

Thanks for the feedback.

> One issue, because this came up earlier this summer, is that when you
> get the loopback address, the best practice is to use 'null' as the
> hostname.  'null' will explicitly return the loopback address and
> avoid any issues with misconfigured hosts files that could cause the
> tests to fail.  I've tested this on Sun and IBM and it should work
> given a read of Harmony source.

I have adjusted as you suggested:

...
InetAddress localhost = InetAddress.getByName( null );
...

And it works at least in my environment within Maven and Eclipse 3.2 
with Sun JDK. Thanks for the hint,
     Stefan


Re: NTP integraion test added (was Re: [ApacheDS] Mini-roadmap for protocol work)

Posted by Enrique Rodriguez <en...@gmail.com>.
On 9/30/07, Stefan Zoerner <st...@labeo.de> wrote:
> Emmanuel Lecharny wrote:
> >> * Should I create the tests in Big Bang or the 1.5 trunk?
> >
> > Add them in trunk, because we need them in trunk, but as we will merge
> > them with bigbang and the way out, at the end of the day, it makes no
> > difference...
>
> Thanks Emmanuel!
>
> I have added a simple integration test for the NTP server here
> http://svn.apache.org/viewvc?view=rev&revision=580746

This is a really nice test.  In particular, it fills a gap between
unit tests and the integration tests in server-unit, providing full
server tests, including codecs.  The tests I added for Kerberos tested
at the IoHandler level and thus did not test the codecs.  I will start
to use something more like what Stefan worked out for the other
protocols.

One issue, because this came up earlier this summer, is that when you
get the loopback address, the best practice is to use 'null' as the
hostname.  'null' will explicitly return the loopback address and
avoid any issues with misconfigured hosts files that could cause the
tests to fail.  I've tested this on Sun and IBM and it should work
given a read of Harmony source.

>From the javadocs:

"If the host is null then an InetAddress  representing an address of
the loopback interface is returned. "

Enrique

Re: NTP integraion test added (was Re: [ApacheDS] Mini-roadmap for protocol work)

Posted by Emmanuel Lecharny <el...@gmail.com>.
> I have added a simple integration test for the NTP server here
> http://svn.apache.org/viewvc?view=rev&revision=580746

Great !

> I will continue to add tests, but have to dive into the implementation
> first ... And my NTP knowledge has to improve as well ...

Yes, I understand. This is why it's so important that the one who
initially implement the code add some tests to help other ones to get
into the code easily.

Thanks a lot for your great work, Stefan !

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: NTP integraion test added (was Re: [ApacheDS] Mini-roadmap for protocol work)

Posted by Alex Karasulu <ak...@apache.org>.
This is great Stefan. I'm really excited to see people digging into these
other protocols.
I'm sure Enrique will help out any way he can to assist you.

Thanks,
Alex

On 9/30/07, Stefan Zoerner <st...@labeo.de> wrote:
>
> Emmanuel Lecharny wrote:
> >> * Should I create the tests in Big Bang or the 1.5 trunk?
> >
> > Add them in trunk, because we need them in trunk, but as we will merge
> > them with bigbang and the way out, at the end of the day, it makes no
> > difference...
>
> Thanks Emmanuel!
>
> I have added a simple integration test for the NTP server here
> http://svn.apache.org/viewvc?view=rev&revision=580746
>
> It simply starts it up in the setup method and checks the current time
> with the Apache Net NTP client (class NTPUDPClient).
>
> I will continue to add tests, but have to dive into the implementation
> first ... And my NTP knowledge has to improve as well ...
>
> Greetings, Stefan
>
>
>
>
>