harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Zhang" <zhanghuang...@gmail.com>
Subject Re: [jira] Commented: (HARMONY-617) [classlib][luni] HttpURLConnection does not support persistent connections
Date Thu, 22 Feb 2007 12:18:57 GMT
On 2/22/07, Alexander Kleymenov <kleymenov@gmail.com> wrote:
>
> Hi Andrew,
>
> > Hi Alexander, why not launch jetty in embedded mode, say, in the test
> code?
>
> It'll make the test dependable on Jetty. And it requires some suporting
> framework to be implemented.


iirc, jetty.jar has already been in dependency list.

> We had a long discussion about jetty, and agreed to use it as a embedded
> web
> > server for harmony test,
>
> To evaluate such an approach some sample tests are needed. I looked for
> them, but could not find.


The sample code looks very simple:
 jetty-based test example:
setUp code:
            port = Support_PortManager.getNextPort();
            Server server = new Server(port);
            ResourceHandler resource_handler=new ResourceHandler();
            resource_handler.setResourceBase("somewhere");
            server.setHandler(resource_handler);
            server.start();
tearDown code:
            server.stop();

> although I'm not sure whether it works for persistent connections.
>
> I doubt it is possible to test persistence implementation with
> external http server. Say, how is it possible to test that our
> implementation will work correctly with 2 established persistent
> connections
> while third connection was interrupted by the server? There could be many
> examples of such testing situations requiring tight control over http
> server
> behaviour.
>
> Thank you for your note, I think we should decide is Jetty appropriate for
> using
> here or not.


Jetty is very flexible, and easy to implement customized handler as we
discussed before[1][2].  Thanks!

[1]
http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%3C2c9597b90608010403o24fce892gf6fc7045cadeb166@mail.gmail.com%3E
[2] http://harmony.apache.org/subcomponents/classlibrary/agreements.html


Alexander
>



-- 
Best regards,
Andrew Zhang

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message