You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Steve Loughran <st...@iseran.com> on 2001/11/03 22:13:06 UTC

http tasks online unit tests

I'm getting the http task set (get, post, head, setproxy) working again,
which, now that I understand much more about the intricasies of how java.net
behaves across different java versions, should be better -although
implementation using http unit would be better. I am not re-using the
base-64 code recently added to <get> as I'm not convinced it works all the
time. When I am then it'll need pulling out into a standalone class instead
of a private inner class of Get.java. Also, I dont have authenticated post
working yet, but will work on that later.

1. I'm going to file this stuff in taskdefs.optional.http

2. I'm going to add unit tests under taskdefs.optional.online and keep that
out the main 'tests' target, so that only people that want to do online
tests will hit the network, and a test run doesnt fail when the net aint
there. I thought about using the <head> task to probe for the network, but
it can still trigger dial up of PSTN/ISDN lines and so incur costs.

3. I am going to run a subset of the tests against the existing <get> task,
also in the online category, verifying that the new authentication works
against a server using basic auth.


Does this seem like a good plan?

-Steve





Re: http tasks online unit tests

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message ----- 
From: "Stefan Bodewig" <bo...@apache.org>
To: <an...@jakarta.apache.org>
Sent: Wednesday, November 14, 2001 7:07 AM
Subject: Re: http tasks online unit tests


> On Thu, 8 Nov 2001, Steve Loughran <st...@iseran.com> wrote:
> 

> > 3. put some big red warning text at the top of the man page stating
> > that things are stable 
> 
> are they?

sorry, typo: "things are unstable"
 
> > 3. move to httpclient with ovidiu's help
> 
> +1
> 
> > 4. have all the online unit tests for this (and any other online
> > tasks) segregated into an online-test target.
> 
> Why do this after switching to httpclient?

Yes, this should go in early 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: http tasks online unit tests

Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 8 Nov 2001, Steve Loughran <st...@iseran.com> wrote:

> 1. check in what there is with an explicit plan to move to
> httpclient as soon as we can 

+1

> 2. add a check for java1.1 and fail if so, just to make sure that no
> 1.1 users get dependent on the tasks 

print a strong warning (and maybe claim that it may not work at all ;-)
would be better IMHO.

> 3. put some big red warning text at the top of the man page stating
> that things are stable 

are they?

> 3. move to httpclient with ovidiu's help

+1

> 4. have all the online unit tests for this (and any other online
> tasks) segregated into an online-test target.

Why do this after switching to httpclient?

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: http tasks online unit tests

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Stefan Bodewig" <bo...@apache.org>
To: <an...@jakarta.apache.org>
Sent: Tuesday, November 06, 2001 01:44
Subject: Re: http tasks online unit tests


> On Mon, 5 Nov 2001, Steve Loughran <st...@iseran.com> wrote:
>
> > yeah, and it works consistently, but only on java1.2+.
>
> Sorry, I didn't realize that dependency - go ahead 8-)

ok, how about this as a plan

1. check in what there is with an explicit plan to move to httpclient as
soon as we can
2. add a check for java1.1 and fail if so, just to make sure that no 1.1
users get dependent on the tasks
3. put some big red warning text at the top of the man page stating that
things are stable
3. move to httpclient with ovidiu's help
4. have all the online unit tests for this (and any other online tasks)
segregated into an online-test target.

-steve




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: http tasks online unit tests

Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 5 Nov 2001, Steve Loughran <st...@iseran.com> wrote:

> yeah, and it works consistently, but only on java1.2+.

Sorry, I didn't realize that dependency - go ahead 8-)

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: http tasks online unit tests

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Stefan Bodewig" <bo...@apache.org>
To: <an...@jakarta.apache.org>
Sent: Monday, November 05, 2001 00:31
Subject: Re: http tasks online unit tests


> Wouldn't it be easier to base all this stuff on the HttpClient code
> from the JakartaCommons project?
>
> I haven't looked into it myself, but it would be silly to reinvent
> (for the third or forth time inside Apache Java projects) what is
> described at <http://jakarta.apache.org/commons/httpclient/> IMHO.

I have thought about it, and it'd be a good todo item.

What I have to check in is based on the java.net package, so it works on 1.1
but has many quirky behaviours related to well known and sometimes less well
known aspects of the rt.jar implementation of client side RFC2616

> Support for HTTPS and Digest Authentication would drop out of this
> immediately and it comes with a fair number of Unit Tests.

yeah, and it works consistently, but only on java1.2+.







--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: http tasks online unit tests

Posted by Stefan Bodewig <bo...@apache.org>.
Wouldn't it be easier to base all this stuff on the HttpClient code
from the JakartaCommons project?

I haven't looked into it myself, but it would be silly to reinvent
(for the third or forth time inside Apache Java projects) what is
described at <http://jakarta.apache.org/commons/httpclient/> IMHO.

Support for HTTPS and Digest Authentication would drop out of this
immediately and it comes with a fair number of Unit Tests.

Stefan


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: http tasks online unit tests

Posted by Gautam Guliani <ga...@grassroots-tech.com>.
As the person who submitted the http basic auth patch to the get task,
let me add some information here.

At 01:13 PM 11/3/2001 -0800, Steve Loughran writes:
 >I'm getting the http task set (get, post, head, setproxy) working again,
 >which, now that I understand much more about the intricasies of how java.net
 >behaves across different java versions, should be better -although
 >implementation using http unit would be better. I am not re-using the
 >base-64 code recently added to <get> as I'm not convinced it works all the
 >time. When I am then it'll need pulling out into a standalone class instead
 >of a private inner class of Get.java. Also, I dont have authenticated post
 >working yet, but will work on that later.
 >

refactoring the base-64 code out, if it is needed else where is fine with me.
I would be curious to get details on the cases where it doesn't work.

 >1. I'm going to file this stuff in taskdefs.optional.http
 >
 >2. I'm going to add unit tests under taskdefs.optional.online and keep that
 >out the main 'tests' target, so that only people that want to do online
 >tests will hit the network, and a test run doesnt fail when the net aint
 >there. I thought about using the <head> task to probe for the network, but
 >it can still trigger dial up of PSTN/ISDN lines and so incur costs.
 >
 >3. I am going to run a subset of the tests against the existing <get> task,
 >also in the online category, verifying that the new authentication works
 >against a server using basic auth.
 >
this was verified by me against two servers, but re-verification is always 
nice.


--
Gautam Guliani    Cell: 917.334.1304   Office: 646.375.2036
Partner, Grassroots Technologies, Inc.  http://www.grassroots-tech.com/


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>