You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kerby@directory.apache.org by Colm O hEigeartaigh <co...@apache.org> on 2015/06/10 11:55:48 UTC

Unit test regression

Hi all,

One of the unit tests in my github repo has stopped working:

Caused by: java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:152)
        at java.net.SocketInputStream.read(SocketInputStream.java:122)
        at java.net.SocketInputStream.read(SocketInputStream.java:210)
        at java.io.DataInputStream.readInt(DataInputStream.java:387)
        at
org.apache.kerby.kerberos.kerb.transport.KrbTcpTransport.receiveMessage(KrbTcpTransport.java:54)
        at
org.apache.kerby.kerberos.kerb.client.impl.DefaultKrbHandler.handleRequest(DefaultKrbHandler.java:40)
        ... 36 more


The test-case is here:

https://github.com/coheigea/testcases/blob/master/apache/cxf/cxf-kerberos-kerby/src/test/java/org/apache/coheigea/cxf/kerberos/authentication/AuthenticationTest.java

Specially, "unitTest". The GSS interop testcases are all fine. Has anything
changed with regards to the client API of Kerby that would cause this?

Colm.


-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

RE: Unit test regression

Posted by "Zheng, Kai" <ka...@intel.com>.
Thanks Colm for the thoughts. Hope https://issues.apache.org/jira/browse/DIRKRB-313 addressed your idea well.

Regards,
Kai

From: Colm O hEigeartaigh [mailto:coheigea@apache.org]
Sent: Tuesday, June 30, 2015 11:00 PM
To: Zheng, Kai
Cc: kerby@directory.apache.org
Subject: Re: Unit test regression

Thanks Kai, I've updated my code :-)
There is just one change that I noticed which could be improved...if you only specify one (TCP) port in the KerbyClient, it will complain with "port out of range:-1". You have to explicitly disable UDP for this to work. I would suggest that it be better that it should only use either UDP or TCP if the port has been configured.
Colm.

On Tue, Jun 30, 2015 at 9:44 AM, Zheng, Kai <ka...@intel.com>> wrote:
Colm,

Recently I made large changes across client, server side and test base codes. I'm afraid it may break your codes. Please let me know if any issue I can help with.

Regards,
Kai

-----Original Message-----
From: Colm O hEigeartaigh [mailto:coheigea@apache.org<ma...@apache.org>]
Sent: Monday, June 22, 2015 10:35 PM
To: kerby@directory.apache.org<ma...@directory.apache.org>
Subject: Re: Unit test regression

Thanks, that works.

Colm.

On Wed, Jun 10, 2015 at 12:17 PM, Zheng, Kai <ka...@intel.com>> wrote:

> Colm,
>
> With the following change it works. I guess previously timeout setting
> doesn't effect. After it's fixed and works now, 5 is too small because
> client and server are not ensured to be started in sequence in the
> test.
>
> -       client.setTimeout(5);
> +       client.setTimeout(50);
>
> Regards,
> Kai
>
> -----Original Message-----
> From: Zheng, Kai [mailto:kai.zheng@intel.com<ma...@intel.com>]
> Sent: Wednesday, June 10, 2015 6:57 PM
> To: kerby@directory.apache.org<ma...@directory.apache.org>; coheigea@apache.org<ma...@apache.org>
> Subject: RE: Unit test regression
>
> I will look at it later.
>
> Regards,
> Kai
>
> -----Original Message-----
> From: Colm O hEigeartaigh [mailto:coheigea@apache.org<ma...@apache.org>]
> Sent: Wednesday, June 10, 2015 5:56 PM
> To: kerby@directory.apache.org<ma...@directory.apache.org>
> Subject: Unit test regression
>
> Hi all,
>
> One of the unit tests in my github repo has stopped working:
>
> Caused by: java.net.SocketTimeoutException: Read timed out
>         at java.net.SocketInputStream.socketRead0(Native Method)
>         at java.net.SocketInputStream.read(SocketInputStream.java:152)
>         at java.net.SocketInputStream.read(SocketInputStream.java:122)
>         at java.net.SocketInputStream.read(SocketInputStream.java:210)
>         at java.io.DataInputStream.readInt(DataInputStream.java:387)
>         at
>
> org.apache.kerby.kerberos.kerb.transport.KrbTcpTransport.receiveMessage(KrbTcpTransport.java:54)
>         at
>
> org.apache.kerby.kerberos.kerb.client.impl.DefaultKrbHandler.handleRequest(DefaultKrbHandler.java:40)
>         ... 36 more
>
>
> The test-case is here:
>
>
> https://github.com/coheigea/testcases/blob/master/apache/cxf/cxf-kerbe
> ros-kerby/src/test/java/org/apache/coheigea/cxf/kerberos/authenticatio
> n/AuthenticationTest.java
>
> Specially, "unitTest". The GSS interop testcases are all fine. Has
> anything changed with regards to the client API of Kerby that would
> cause this?
>
> Colm.
>
>
> --
> Colm O hEigeartaigh
>
> Talend Community Coder
> http://coders.talend.com
>



--
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com



--
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Re: Unit test regression

Posted by Colm O hEigeartaigh <co...@apache.org>.
Thanks Kai, I've updated my code :-)

There is just one change that I noticed which could be improved...if you
only specify one (TCP) port in the KerbyClient, it will complain with "port
out of range:-1". You have to explicitly disable UDP for this to work. I
would suggest that it be better that it should only use either UDP or TCP
if the port has been configured.

Colm.

On Tue, Jun 30, 2015 at 9:44 AM, Zheng, Kai <ka...@intel.com> wrote:

> Colm,
>
> Recently I made large changes across client, server side and test base
> codes. I'm afraid it may break your codes. Please let me know if any issue
> I can help with.
>
> Regards,
> Kai
>
> -----Original Message-----
> From: Colm O hEigeartaigh [mailto:coheigea@apache.org]
> Sent: Monday, June 22, 2015 10:35 PM
> To: kerby@directory.apache.org
> Subject: Re: Unit test regression
>
> Thanks, that works.
>
> Colm.
>
> On Wed, Jun 10, 2015 at 12:17 PM, Zheng, Kai <ka...@intel.com> wrote:
>
> > Colm,
> >
> > With the following change it works. I guess previously timeout setting
> > doesn't effect. After it's fixed and works now, 5 is too small because
> > client and server are not ensured to be started in sequence in the
> > test.
> >
> > -       client.setTimeout(5);
> > +       client.setTimeout(50);
> >
> > Regards,
> > Kai
> >
> > -----Original Message-----
> > From: Zheng, Kai [mailto:kai.zheng@intel.com]
> > Sent: Wednesday, June 10, 2015 6:57 PM
> > To: kerby@directory.apache.org; coheigea@apache.org
> > Subject: RE: Unit test regression
> >
> > I will look at it later.
> >
> > Regards,
> > Kai
> >
> > -----Original Message-----
> > From: Colm O hEigeartaigh [mailto:coheigea@apache.org]
> > Sent: Wednesday, June 10, 2015 5:56 PM
> > To: kerby@directory.apache.org
> > Subject: Unit test regression
> >
> > Hi all,
> >
> > One of the unit tests in my github repo has stopped working:
> >
> > Caused by: java.net.SocketTimeoutException: Read timed out
> >         at java.net.SocketInputStream.socketRead0(Native Method)
> >         at java.net.SocketInputStream.read(SocketInputStream.java:152)
> >         at java.net.SocketInputStream.read(SocketInputStream.java:122)
> >         at java.net.SocketInputStream.read(SocketInputStream.java:210)
> >         at java.io.DataInputStream.readInt(DataInputStream.java:387)
> >         at
> >
> >
> org.apache.kerby.kerberos.kerb.transport.KrbTcpTransport.receiveMessage(KrbTcpTransport.java:54)
> >         at
> >
> >
> org.apache.kerby.kerberos.kerb.client.impl.DefaultKrbHandler.handleRequest(DefaultKrbHandler.java:40)
> >         ... 36 more
> >
> >
> > The test-case is here:
> >
> >
> > https://github.com/coheigea/testcases/blob/master/apache/cxf/cxf-kerbe
> > ros-kerby/src/test/java/org/apache/coheigea/cxf/kerberos/authenticatio
> > n/AuthenticationTest.java
> >
> > Specially, "unitTest". The GSS interop testcases are all fine. Has
> > anything changed with regards to the client API of Kerby that would
> > cause this?
> >
> > Colm.
> >
> >
> > --
> > Colm O hEigeartaigh
> >
> > Talend Community Coder
> > http://coders.talend.com
> >
>
>
>
> --
> Colm O hEigeartaigh
>
> Talend Community Coder
> http://coders.talend.com
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

RE: Unit test regression

Posted by "Zheng, Kai" <ka...@intel.com>.
Colm,

Recently I made large changes across client, server side and test base codes. I'm afraid it may break your codes. Please let me know if any issue I can help with. 

Regards,
Kai

-----Original Message-----
From: Colm O hEigeartaigh [mailto:coheigea@apache.org] 
Sent: Monday, June 22, 2015 10:35 PM
To: kerby@directory.apache.org
Subject: Re: Unit test regression

Thanks, that works.

Colm.

On Wed, Jun 10, 2015 at 12:17 PM, Zheng, Kai <ka...@intel.com> wrote:

> Colm,
>
> With the following change it works. I guess previously timeout setting 
> doesn't effect. After it's fixed and works now, 5 is too small because 
> client and server are not ensured to be started in sequence in the 
> test.
>
> -       client.setTimeout(5);
> +       client.setTimeout(50);
>
> Regards,
> Kai
>
> -----Original Message-----
> From: Zheng, Kai [mailto:kai.zheng@intel.com]
> Sent: Wednesday, June 10, 2015 6:57 PM
> To: kerby@directory.apache.org; coheigea@apache.org
> Subject: RE: Unit test regression
>
> I will look at it later.
>
> Regards,
> Kai
>
> -----Original Message-----
> From: Colm O hEigeartaigh [mailto:coheigea@apache.org]
> Sent: Wednesday, June 10, 2015 5:56 PM
> To: kerby@directory.apache.org
> Subject: Unit test regression
>
> Hi all,
>
> One of the unit tests in my github repo has stopped working:
>
> Caused by: java.net.SocketTimeoutException: Read timed out
>         at java.net.SocketInputStream.socketRead0(Native Method)
>         at java.net.SocketInputStream.read(SocketInputStream.java:152)
>         at java.net.SocketInputStream.read(SocketInputStream.java:122)
>         at java.net.SocketInputStream.read(SocketInputStream.java:210)
>         at java.io.DataInputStream.readInt(DataInputStream.java:387)
>         at
>
> org.apache.kerby.kerberos.kerb.transport.KrbTcpTransport.receiveMessage(KrbTcpTransport.java:54)
>         at
>
> org.apache.kerby.kerberos.kerb.client.impl.DefaultKrbHandler.handleRequest(DefaultKrbHandler.java:40)
>         ... 36 more
>
>
> The test-case is here:
>
>
> https://github.com/coheigea/testcases/blob/master/apache/cxf/cxf-kerbe
> ros-kerby/src/test/java/org/apache/coheigea/cxf/kerberos/authenticatio
> n/AuthenticationTest.java
>
> Specially, "unitTest". The GSS interop testcases are all fine. Has 
> anything changed with regards to the client API of Kerby that would 
> cause this?
>
> Colm.
>
>
> --
> Colm O hEigeartaigh
>
> Talend Community Coder
> http://coders.talend.com
>



--
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Re: Unit test regression

Posted by Colm O hEigeartaigh <co...@apache.org>.
Thanks, that works.

Colm.

On Wed, Jun 10, 2015 at 12:17 PM, Zheng, Kai <ka...@intel.com> wrote:

> Colm,
>
> With the following change it works. I guess previously timeout setting
> doesn't effect. After it's fixed and works now, 5 is too small because
> client and server
> are not ensured to be started in sequence in the test.
>
> -       client.setTimeout(5);
> +       client.setTimeout(50);
>
> Regards,
> Kai
>
> -----Original Message-----
> From: Zheng, Kai [mailto:kai.zheng@intel.com]
> Sent: Wednesday, June 10, 2015 6:57 PM
> To: kerby@directory.apache.org; coheigea@apache.org
> Subject: RE: Unit test regression
>
> I will look at it later.
>
> Regards,
> Kai
>
> -----Original Message-----
> From: Colm O hEigeartaigh [mailto:coheigea@apache.org]
> Sent: Wednesday, June 10, 2015 5:56 PM
> To: kerby@directory.apache.org
> Subject: Unit test regression
>
> Hi all,
>
> One of the unit tests in my github repo has stopped working:
>
> Caused by: java.net.SocketTimeoutException: Read timed out
>         at java.net.SocketInputStream.socketRead0(Native Method)
>         at java.net.SocketInputStream.read(SocketInputStream.java:152)
>         at java.net.SocketInputStream.read(SocketInputStream.java:122)
>         at java.net.SocketInputStream.read(SocketInputStream.java:210)
>         at java.io.DataInputStream.readInt(DataInputStream.java:387)
>         at
>
> org.apache.kerby.kerberos.kerb.transport.KrbTcpTransport.receiveMessage(KrbTcpTransport.java:54)
>         at
>
> org.apache.kerby.kerberos.kerb.client.impl.DefaultKrbHandler.handleRequest(DefaultKrbHandler.java:40)
>         ... 36 more
>
>
> The test-case is here:
>
>
> https://github.com/coheigea/testcases/blob/master/apache/cxf/cxf-kerberos-kerby/src/test/java/org/apache/coheigea/cxf/kerberos/authentication/AuthenticationTest.java
>
> Specially, "unitTest". The GSS interop testcases are all fine. Has
> anything changed with regards to the client API of Kerby that would cause
> this?
>
> Colm.
>
>
> --
> Colm O hEigeartaigh
>
> Talend Community Coder
> http://coders.talend.com
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

RE: Unit test regression

Posted by "Zheng, Kai" <ka...@intel.com>.
Colm,

With the following change it works. I guess previously timeout setting doesn't effect. After it's fixed and works now, 5 is too small because client and server
are not ensured to be started in sequence in the test.

-       client.setTimeout(5);
+       client.setTimeout(50);

Regards,
Kai

-----Original Message-----
From: Zheng, Kai [mailto:kai.zheng@intel.com] 
Sent: Wednesday, June 10, 2015 6:57 PM
To: kerby@directory.apache.org; coheigea@apache.org
Subject: RE: Unit test regression

I will look at it later.

Regards,
Kai

-----Original Message-----
From: Colm O hEigeartaigh [mailto:coheigea@apache.org] 
Sent: Wednesday, June 10, 2015 5:56 PM
To: kerby@directory.apache.org
Subject: Unit test regression

Hi all,

One of the unit tests in my github repo has stopped working:

Caused by: java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:152)
        at java.net.SocketInputStream.read(SocketInputStream.java:122)
        at java.net.SocketInputStream.read(SocketInputStream.java:210)
        at java.io.DataInputStream.readInt(DataInputStream.java:387)
        at
org.apache.kerby.kerberos.kerb.transport.KrbTcpTransport.receiveMessage(KrbTcpTransport.java:54)
        at
org.apache.kerby.kerberos.kerb.client.impl.DefaultKrbHandler.handleRequest(DefaultKrbHandler.java:40)
        ... 36 more


The test-case is here:

https://github.com/coheigea/testcases/blob/master/apache/cxf/cxf-kerberos-kerby/src/test/java/org/apache/coheigea/cxf/kerberos/authentication/AuthenticationTest.java

Specially, "unitTest". The GSS interop testcases are all fine. Has anything changed with regards to the client API of Kerby that would cause this?

Colm.


--
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

RE: Unit test regression

Posted by "Zheng, Kai" <ka...@intel.com>.
I will look at it later.

Regards,
Kai

-----Original Message-----
From: Colm O hEigeartaigh [mailto:coheigea@apache.org] 
Sent: Wednesday, June 10, 2015 5:56 PM
To: kerby@directory.apache.org
Subject: Unit test regression

Hi all,

One of the unit tests in my github repo has stopped working:

Caused by: java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:152)
        at java.net.SocketInputStream.read(SocketInputStream.java:122)
        at java.net.SocketInputStream.read(SocketInputStream.java:210)
        at java.io.DataInputStream.readInt(DataInputStream.java:387)
        at
org.apache.kerby.kerberos.kerb.transport.KrbTcpTransport.receiveMessage(KrbTcpTransport.java:54)
        at
org.apache.kerby.kerberos.kerb.client.impl.DefaultKrbHandler.handleRequest(DefaultKrbHandler.java:40)
        ... 36 more


The test-case is here:

https://github.com/coheigea/testcases/blob/master/apache/cxf/cxf-kerberos-kerby/src/test/java/org/apache/coheigea/cxf/kerberos/authentication/AuthenticationTest.java

Specially, "unitTest". The GSS interop testcases are all fine. Has anything changed with regards to the client API of Kerby that would cause this?

Colm.


--
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com