You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Tony Wu <wu...@gmail.com> on 2007/03/01 03:38:34 UTC

Re: [classlib][test]how to set up a http proxy server for unit test.

Thanks Alexei,

that's not a bad idea, we can find all TODOs in exclude lists rather
than src code.
I'll try if no one object.

On 2/28/07, Alexei Zakharov <al...@gmail.com> wrote:
> Hi Tony,
>
> IIRC we have agreed that commenting out test code is not the best
> possible solution. Can we just split off proxy-related tests into a
> separate test class (<something>ProxyTest for example) and then put
> this new class to exclude list?
>
> Thanks,
>
> 2007/2/27, Tony Wu <wu...@gmail.com>:
> > Hello all,
> > I have been working on moving out the exclude tests in java.net these
> > days. Some of them need a proxy server. IIRC we have adopted jetty to
> > avoid external server dependencies before, but unfortunately, the
> > ProxyHandler of Jetty has not been implemented yet. So I purpose to
> > comment out the proxy related testcases and move out the test class
> > from exclude list. I'll add a TODO in the code and wait for the
> > upcoming new version of Jetty.
> >
> > Another way is tha find out another tool to set up a proxy server. In
> > my opinion, we'd better not import another dependency if possible. And
> > if it is not an embedding server, we have to write some ugly code in
> > order to run test automatically.
> >
> > suggestions?concerns?
> >
> > --
> > Tony Wu
> > China Software Development Lab, IBM
> >
>
>
> --
> Alexei Zakharov,
> Intel ESSD
>


-- 
Tony Wu
China Software Development Lab, IBM

Re: [classlib][test]how to set up a http proxy server for unit test.

Posted by Tony Wu <wu...@gmail.com>.
That's will be a doom to find out what testcases have been excluded.

On 3/5/07, Andrew Zhang <zh...@gmail.com> wrote:
> On 3/5/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> >
> >
> > On Mar 3, 2007, at 11:48 PM, Ruth Cao wrote:
> >
> > > 2007/3/3, Geir Magnusson Jr. <ge...@pobox.com>:
> > >>
> > >> Why not leave them in the exclude list?
> > >
> > >
> > > Since in some tests (i.e.
> > > tests.api.java.net.HttpURLConnectionTest), we can
> > > get all the test cases out of the exclude list using Jetty except
> > > the one
> > > which needs a proxy server. If we comment out the related one, more
> > > test
> > > cases can be run continuously.
> >
> > Got it.  Too bad there isn't a notation for excluding specific tests,
> > rather than just test classes :
> >
> >   org.apache.harmony.whatever.Foo#testWoogie
>
>
> How about to use _testXXX to exclude a test case?
>
> >
> > > Also, what do we need from Jetty?
> > >
> > >
> > > We need a ProxyHandler that can start an embeded proxy server.
> > > Jetty 6 has a
> > > plan to implement it, but it seems that it won't be available in a
> > > short
> > > time[1] :-)
> > >
> > > [1] http://www.nabble.com/Jetty6-proxy-handler-t2721411.html
> > >
> > > Greg and Jan are really great
> > >> people, and may be willing to help us out, especially when they find
> > >> out that the World's First Implementation of Open  Source Java needs
> > >> it :)
> > >>
> > >> geir
> > >>
> > >> On Mar 1, 2007, at 1:50 AM, Alexei Zakharov wrote:
> > >>
> > >> >> that's not a bad idea, we can find all TODOs in exclude lists
> > >> rather
> > >> >> than src code.
> > >> >
> > >> > Yes, this is exactly what I mean.
> > >> >
> > >> > Thanks,
> > >> >
> > >> > 2007/3/1, Tony Wu <wu...@gmail.com>:
> > >> >> Thanks Alexei,
> > >> >>
> > >> >> that's not a bad idea, we can find all TODOs in exclude lists
> > >> rather
> > >> >> than src code.
> > >> >> I'll try if no one object.
> > >> >>
> > >> >> On 2/28/07, Alexei Zakharov <al...@gmail.com> wrote:
> > >> >> > Hi Tony,
> > >> >> >
> > >> >> > IIRC we have agreed that commenting out test code is not the
> > >> best
> > >> >> > possible solution. Can we just split off proxy-related tests
> > >> into a
> > >> >> > separate test class (<something>ProxyTest for example) and
> > >> then put
> > >> >> > this new class to exclude list?
> > >> >> >
> > >> >> > Thanks,
> > >> >> >
> > >> >> > 2007/2/27, Tony Wu <wu...@gmail.com>:
> > >> >> > > Hello all,
> > >> >> > > I have been working on moving out the exclude tests in
> > >> >> java.net these
> > >> >> > > days. Some of them need a proxy server. IIRC we have adopted
> > >> >> jetty to
> > >> >> > > avoid external server dependencies before, but
> > >> unfortunately, the
> > >> >> > > ProxyHandler of Jetty has not been implemented yet. So I
> > >> >> purpose to
> > >> >> > > comment out the proxy related testcases and move out the test
> > >> >> class
> > >> >> > > from exclude list. I'll add a TODO in the code and wait for
> > >> the
> > >> >> > > upcoming new version of Jetty.
> > >> >> > >
> > >> >> > > Another way is tha find out another tool to set up a proxy
> > >> >> server. In
> > >> >> > > my opinion, we'd better not import another dependency if
> > >> >> possible. And
> > >> >> > > if it is not an embedding server, we have to write some ugly
> > >> >> code in
> > >> >> > > order to run test automatically.
> > >> >> > >
> > >> >> > > suggestions?concerns?
> > >> >
> > >> > --
> > >> > Alexei Zakharov,
> > >> > Intel ESSD
> > >>
> > >>
> > >
> > >
> > > --
> > > Best regards,
> > >
> > > Ruth Cao
> > > China Software Development Lab, IBM
> >
> >
>
>
> --
> Best regards,
> Andrew Zhang
>


-- 
Tony Wu
China Software Development Lab, IBM

Re: [classlib][test]how to set up a http proxy server for unit test.

Posted by Andrew Zhang <zh...@gmail.com>.
On 3/5/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
>
>
> On Mar 3, 2007, at 11:48 PM, Ruth Cao wrote:
>
> > 2007/3/3, Geir Magnusson Jr. <ge...@pobox.com>:
> >>
> >> Why not leave them in the exclude list?
> >
> >
> > Since in some tests (i.e.
> > tests.api.java.net.HttpURLConnectionTest), we can
> > get all the test cases out of the exclude list using Jetty except
> > the one
> > which needs a proxy server. If we comment out the related one, more
> > test
> > cases can be run continuously.
>
> Got it.  Too bad there isn't a notation for excluding specific tests,
> rather than just test classes :
>
>   org.apache.harmony.whatever.Foo#testWoogie


How about to use _testXXX to exclude a test case?

>
> > Also, what do we need from Jetty?
> >
> >
> > We need a ProxyHandler that can start an embeded proxy server.
> > Jetty 6 has a
> > plan to implement it, but it seems that it won't be available in a
> > short
> > time[1] :-)
> >
> > [1] http://www.nabble.com/Jetty6-proxy-handler-t2721411.html
> >
> > Greg and Jan are really great
> >> people, and may be willing to help us out, especially when they find
> >> out that the World's First Implementation of Open  Source Java needs
> >> it :)
> >>
> >> geir
> >>
> >> On Mar 1, 2007, at 1:50 AM, Alexei Zakharov wrote:
> >>
> >> >> that's not a bad idea, we can find all TODOs in exclude lists
> >> rather
> >> >> than src code.
> >> >
> >> > Yes, this is exactly what I mean.
> >> >
> >> > Thanks,
> >> >
> >> > 2007/3/1, Tony Wu <wu...@gmail.com>:
> >> >> Thanks Alexei,
> >> >>
> >> >> that's not a bad idea, we can find all TODOs in exclude lists
> >> rather
> >> >> than src code.
> >> >> I'll try if no one object.
> >> >>
> >> >> On 2/28/07, Alexei Zakharov <al...@gmail.com> wrote:
> >> >> > Hi Tony,
> >> >> >
> >> >> > IIRC we have agreed that commenting out test code is not the
> >> best
> >> >> > possible solution. Can we just split off proxy-related tests
> >> into a
> >> >> > separate test class (<something>ProxyTest for example) and
> >> then put
> >> >> > this new class to exclude list?
> >> >> >
> >> >> > Thanks,
> >> >> >
> >> >> > 2007/2/27, Tony Wu <wu...@gmail.com>:
> >> >> > > Hello all,
> >> >> > > I have been working on moving out the exclude tests in
> >> >> java.net these
> >> >> > > days. Some of them need a proxy server. IIRC we have adopted
> >> >> jetty to
> >> >> > > avoid external server dependencies before, but
> >> unfortunately, the
> >> >> > > ProxyHandler of Jetty has not been implemented yet. So I
> >> >> purpose to
> >> >> > > comment out the proxy related testcases and move out the test
> >> >> class
> >> >> > > from exclude list. I'll add a TODO in the code and wait for
> >> the
> >> >> > > upcoming new version of Jetty.
> >> >> > >
> >> >> > > Another way is tha find out another tool to set up a proxy
> >> >> server. In
> >> >> > > my opinion, we'd better not import another dependency if
> >> >> possible. And
> >> >> > > if it is not an embedding server, we have to write some ugly
> >> >> code in
> >> >> > > order to run test automatically.
> >> >> > >
> >> >> > > suggestions?concerns?
> >> >
> >> > --
> >> > Alexei Zakharov,
> >> > Intel ESSD
> >>
> >>
> >
> >
> > --
> > Best regards,
> >
> > Ruth Cao
> > China Software Development Lab, IBM
>
>


-- 
Best regards,
Andrew Zhang

Re: [classlib][test]how to set up a http proxy server for unit test.

Posted by Tony Wu <wu...@gmail.com>.
Yes, that's one of the reasons why we want testng ;-)

On 3/5/07, Geir Magnusson Jr. <ge...@pobox.com> wrote:
>
> On Mar 3, 2007, at 11:48 PM, Ruth Cao wrote:
>
> > 2007/3/3, Geir Magnusson Jr. <ge...@pobox.com>:
> >>
> >> Why not leave them in the exclude list?
> >
> >
> > Since in some tests (i.e.
> > tests.api.java.net.HttpURLConnectionTest), we can
> > get all the test cases out of the exclude list using Jetty except
> > the one
> > which needs a proxy server. If we comment out the related one, more
> > test
> > cases can be run continuously.
>
> Got it.  Too bad there isn't a notation for excluding specific tests,
> rather than just test classes :
>
>   org.apache.harmony.whatever.Foo#testWoogie
>
> >
> > Also, what do we need from Jetty?
> >
> >
> > We need a ProxyHandler that can start an embeded proxy server.
> > Jetty 6 has a
> > plan to implement it, but it seems that it won't be available in a
> > short
> > time[1] :-)
> >
> > [1] http://www.nabble.com/Jetty6-proxy-handler-t2721411.html
> >
> > Greg and Jan are really great
> >> people, and may be willing to help us out, especially when they find
> >> out that the World's First Implementation of Open  Source Java needs
> >> it :)
> >>
> >> geir
> >>
> >> On Mar 1, 2007, at 1:50 AM, Alexei Zakharov wrote:
> >>
> >> >> that's not a bad idea, we can find all TODOs in exclude lists
> >> rather
> >> >> than src code.
> >> >
> >> > Yes, this is exactly what I mean.
> >> >
> >> > Thanks,
> >> >
> >> > 2007/3/1, Tony Wu <wu...@gmail.com>:
> >> >> Thanks Alexei,
> >> >>
> >> >> that's not a bad idea, we can find all TODOs in exclude lists
> >> rather
> >> >> than src code.
> >> >> I'll try if no one object.
> >> >>
> >> >> On 2/28/07, Alexei Zakharov <al...@gmail.com> wrote:
> >> >> > Hi Tony,
> >> >> >
> >> >> > IIRC we have agreed that commenting out test code is not the
> >> best
> >> >> > possible solution. Can we just split off proxy-related tests
> >> into a
> >> >> > separate test class (<something>ProxyTest for example) and
> >> then put
> >> >> > this new class to exclude list?
> >> >> >
> >> >> > Thanks,
> >> >> >
> >> >> > 2007/2/27, Tony Wu <wu...@gmail.com>:
> >> >> > > Hello all,
> >> >> > > I have been working on moving out the exclude tests in
> >> >> java.net these
> >> >> > > days. Some of them need a proxy server. IIRC we have adopted
> >> >> jetty to
> >> >> > > avoid external server dependencies before, but
> >> unfortunately, the
> >> >> > > ProxyHandler of Jetty has not been implemented yet. So I
> >> >> purpose to
> >> >> > > comment out the proxy related testcases and move out the test
> >> >> class
> >> >> > > from exclude list. I'll add a TODO in the code and wait for
> >> the
> >> >> > > upcoming new version of Jetty.
> >> >> > >
> >> >> > > Another way is tha find out another tool to set up a proxy
> >> >> server. In
> >> >> > > my opinion, we'd better not import another dependency if
> >> >> possible. And
> >> >> > > if it is not an embedding server, we have to write some ugly
> >> >> code in
> >> >> > > order to run test automatically.
> >> >> > >
> >> >> > > suggestions?concerns?
> >> >
> >> > --
> >> > Alexei Zakharov,
> >> > Intel ESSD
> >>
> >>
> >
> >
> > --
> > Best regards,
> >
> > Ruth Cao
> > China Software Development Lab, IBM
>
>


-- 
Tony Wu
China Software Development Lab, IBM

Re: [classlib][test]how to set up a http proxy server for unit test.

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
On Mar 3, 2007, at 11:48 PM, Ruth Cao wrote:

> 2007/3/3, Geir Magnusson Jr. <ge...@pobox.com>:
>>
>> Why not leave them in the exclude list?
>
>
> Since in some tests (i.e.  
> tests.api.java.net.HttpURLConnectionTest), we can
> get all the test cases out of the exclude list using Jetty except  
> the one
> which needs a proxy server. If we comment out the related one, more  
> test
> cases can be run continuously.

Got it.  Too bad there isn't a notation for excluding specific tests,  
rather than just test classes :

   org.apache.harmony.whatever.Foo#testWoogie

>
> Also, what do we need from Jetty?
>
>
> We need a ProxyHandler that can start an embeded proxy server.  
> Jetty 6 has a
> plan to implement it, but it seems that it won't be available in a  
> short
> time[1] :-)
>
> [1] http://www.nabble.com/Jetty6-proxy-handler-t2721411.html
>
> Greg and Jan are really great
>> people, and may be willing to help us out, especially when they find
>> out that the World's First Implementation of Open  Source Java needs
>> it :)
>>
>> geir
>>
>> On Mar 1, 2007, at 1:50 AM, Alexei Zakharov wrote:
>>
>> >> that's not a bad idea, we can find all TODOs in exclude lists  
>> rather
>> >> than src code.
>> >
>> > Yes, this is exactly what I mean.
>> >
>> > Thanks,
>> >
>> > 2007/3/1, Tony Wu <wu...@gmail.com>:
>> >> Thanks Alexei,
>> >>
>> >> that's not a bad idea, we can find all TODOs in exclude lists  
>> rather
>> >> than src code.
>> >> I'll try if no one object.
>> >>
>> >> On 2/28/07, Alexei Zakharov <al...@gmail.com> wrote:
>> >> > Hi Tony,
>> >> >
>> >> > IIRC we have agreed that commenting out test code is not the  
>> best
>> >> > possible solution. Can we just split off proxy-related tests  
>> into a
>> >> > separate test class (<something>ProxyTest for example) and  
>> then put
>> >> > this new class to exclude list?
>> >> >
>> >> > Thanks,
>> >> >
>> >> > 2007/2/27, Tony Wu <wu...@gmail.com>:
>> >> > > Hello all,
>> >> > > I have been working on moving out the exclude tests in
>> >> java.net these
>> >> > > days. Some of them need a proxy server. IIRC we have adopted
>> >> jetty to
>> >> > > avoid external server dependencies before, but  
>> unfortunately, the
>> >> > > ProxyHandler of Jetty has not been implemented yet. So I
>> >> purpose to
>> >> > > comment out the proxy related testcases and move out the test
>> >> class
>> >> > > from exclude list. I'll add a TODO in the code and wait for  
>> the
>> >> > > upcoming new version of Jetty.
>> >> > >
>> >> > > Another way is tha find out another tool to set up a proxy
>> >> server. In
>> >> > > my opinion, we'd better not import another dependency if
>> >> possible. And
>> >> > > if it is not an embedding server, we have to write some ugly
>> >> code in
>> >> > > order to run test automatically.
>> >> > >
>> >> > > suggestions?concerns?
>> >
>> > --
>> > Alexei Zakharov,
>> > Intel ESSD
>>
>>
>
>
> -- 
> Best regards,
>
> Ruth Cao
> China Software Development Lab, IBM


Re: [classlib][test]how to set up a http proxy server for unit test.

Posted by Ruth Cao <ru...@gmail.com>.
2007/3/3, Geir Magnusson Jr. <ge...@pobox.com>:
>
> Why not leave them in the exclude list?


Since in some tests (i.e. tests.api.java.net.HttpURLConnectionTest), we can
get all the test cases out of the exclude list using Jetty except the one
which needs a proxy server. If we comment out the related one, more test
cases can be run continuously.

Also, what do we need from Jetty?


We need a ProxyHandler that can start an embeded proxy server. Jetty 6 has a
plan to implement it, but it seems that it won't be available in a short
time[1] :-)

[1] http://www.nabble.com/Jetty6-proxy-handler-t2721411.html

Greg and Jan are really great
> people, and may be willing to help us out, especially when they find
> out that the World's First Implementation of Open  Source Java needs
> it :)
>
> geir
>
> On Mar 1, 2007, at 1:50 AM, Alexei Zakharov wrote:
>
> >> that's not a bad idea, we can find all TODOs in exclude lists rather
> >> than src code.
> >
> > Yes, this is exactly what I mean.
> >
> > Thanks,
> >
> > 2007/3/1, Tony Wu <wu...@gmail.com>:
> >> Thanks Alexei,
> >>
> >> that's not a bad idea, we can find all TODOs in exclude lists rather
> >> than src code.
> >> I'll try if no one object.
> >>
> >> On 2/28/07, Alexei Zakharov <al...@gmail.com> wrote:
> >> > Hi Tony,
> >> >
> >> > IIRC we have agreed that commenting out test code is not the best
> >> > possible solution. Can we just split off proxy-related tests into a
> >> > separate test class (<something>ProxyTest for example) and then put
> >> > this new class to exclude list?
> >> >
> >> > Thanks,
> >> >
> >> > 2007/2/27, Tony Wu <wu...@gmail.com>:
> >> > > Hello all,
> >> > > I have been working on moving out the exclude tests in
> >> java.net these
> >> > > days. Some of them need a proxy server. IIRC we have adopted
> >> jetty to
> >> > > avoid external server dependencies before, but unfortunately, the
> >> > > ProxyHandler of Jetty has not been implemented yet. So I
> >> purpose to
> >> > > comment out the proxy related testcases and move out the test
> >> class
> >> > > from exclude list. I'll add a TODO in the code and wait for the
> >> > > upcoming new version of Jetty.
> >> > >
> >> > > Another way is tha find out another tool to set up a proxy
> >> server. In
> >> > > my opinion, we'd better not import another dependency if
> >> possible. And
> >> > > if it is not an embedding server, we have to write some ugly
> >> code in
> >> > > order to run test automatically.
> >> > >
> >> > > suggestions?concerns?
> >
> > --
> > Alexei Zakharov,
> > Intel ESSD
>
>


-- 
Best regards,

Ruth Cao
China Software Development Lab, IBM

Re: [classlib][test]how to set up a http proxy server for unit test.

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
Why not leave them in the exclude list?

Also, what do we need from Jetty?  Greg and Jan are really great  
people, and may be willing to help us out, especially when they find  
out that the World's First Implementation of Open  Source Java needs  
it :)

geir

On Mar 1, 2007, at 1:50 AM, Alexei Zakharov wrote:

>> that's not a bad idea, we can find all TODOs in exclude lists rather
>> than src code.
>
> Yes, this is exactly what I mean.
>
> Thanks,
>
> 2007/3/1, Tony Wu <wu...@gmail.com>:
>> Thanks Alexei,
>>
>> that's not a bad idea, we can find all TODOs in exclude lists rather
>> than src code.
>> I'll try if no one object.
>>
>> On 2/28/07, Alexei Zakharov <al...@gmail.com> wrote:
>> > Hi Tony,
>> >
>> > IIRC we have agreed that commenting out test code is not the best
>> > possible solution. Can we just split off proxy-related tests into a
>> > separate test class (<something>ProxyTest for example) and then put
>> > this new class to exclude list?
>> >
>> > Thanks,
>> >
>> > 2007/2/27, Tony Wu <wu...@gmail.com>:
>> > > Hello all,
>> > > I have been working on moving out the exclude tests in  
>> java.net these
>> > > days. Some of them need a proxy server. IIRC we have adopted  
>> jetty to
>> > > avoid external server dependencies before, but unfortunately, the
>> > > ProxyHandler of Jetty has not been implemented yet. So I  
>> purpose to
>> > > comment out the proxy related testcases and move out the test  
>> class
>> > > from exclude list. I'll add a TODO in the code and wait for the
>> > > upcoming new version of Jetty.
>> > >
>> > > Another way is tha find out another tool to set up a proxy  
>> server. In
>> > > my opinion, we'd better not import another dependency if  
>> possible. And
>> > > if it is not an embedding server, we have to write some ugly  
>> code in
>> > > order to run test automatically.
>> > >
>> > > suggestions?concerns?
>
> -- 
> Alexei Zakharov,
> Intel ESSD


Re: [classlib][test]how to set up a http proxy server for unit test.

Posted by Alexei Zakharov <al...@gmail.com>.
> that's not a bad idea, we can find all TODOs in exclude lists rather
> than src code.

Yes, this is exactly what I mean.

Thanks,

2007/3/1, Tony Wu <wu...@gmail.com>:
> Thanks Alexei,
>
> that's not a bad idea, we can find all TODOs in exclude lists rather
> than src code.
> I'll try if no one object.
>
> On 2/28/07, Alexei Zakharov <al...@gmail.com> wrote:
> > Hi Tony,
> >
> > IIRC we have agreed that commenting out test code is not the best
> > possible solution. Can we just split off proxy-related tests into a
> > separate test class (<something>ProxyTest for example) and then put
> > this new class to exclude list?
> >
> > Thanks,
> >
> > 2007/2/27, Tony Wu <wu...@gmail.com>:
> > > Hello all,
> > > I have been working on moving out the exclude tests in java.net these
> > > days. Some of them need a proxy server. IIRC we have adopted jetty to
> > > avoid external server dependencies before, but unfortunately, the
> > > ProxyHandler of Jetty has not been implemented yet. So I purpose to
> > > comment out the proxy related testcases and move out the test class
> > > from exclude list. I'll add a TODO in the code and wait for the
> > > upcoming new version of Jetty.
> > >
> > > Another way is tha find out another tool to set up a proxy server. In
> > > my opinion, we'd better not import another dependency if possible. And
> > > if it is not an embedding server, we have to write some ugly code in
> > > order to run test automatically.
> > >
> > > suggestions?concerns?

-- 
Alexei Zakharov,
Intel ESSD