harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Liang <richard.lian...@gmail.com>
Subject Re: local test server (Was: Re: [jira] Commented: (HARMONY-71) java.net.URLConnection.setUseCaches throws unspecified IllegalAccessError)
Date Mon, 06 Mar 2006 00:50:52 GMT
Yes, Jetty is a good option :-)

Richard Liang
China Software Development Lab, IBM



Geir Magnusson Jr wrote:
>
>
> Stepan Mishura wrote:
>> Tim, George, I'd like to resume this topic
>
> Thanks for posting to the dev list :)
>
>>
>>> There is no way to force a server to send you a chunked response using
>>> regular HTTP headers, so in this case the server and client have an
>>> understanding that when the client asks for a particular resource the
>>> server will send it back in chunks.
>>>
>>
>> I've created a small local server that just demonstrates common approach
>> only. The idea is the next: a simple local server provides a way for 
>> a unit
>> test to configure a server's response (also it may be improved to save a
>> request message to be check by a unit test):
>>               ---invoke--->            ---request--->
>> A unit tests            tested API             a local server instance
>>     |         <---result---            <---response---   ^
>>     |                                                              |
>>      -------------------configure server--------------------
>>
>> I believe this approach may be applied for most of cases and allow us to
>> eliminate dependency on an external server.
>
> And give us tight control to be able to mimic misbehavior on the 
> server side to be sure that the library behaves correctly.
>
>>
>> I've created JIRA (see Harmony-164) and attached a file with local 
>> server
>> and 2 JUnit test cases (one of them sends a chunked response, please 
>> note
>> there is no server's code specific for a selected test). Could you 
>> please
>> review the code and let me know what you think?
>
> I took a quick look, and while I really am convinced that our own 
> framework is necessary for all sorts of reasons I and others have 
> listed already, I do wonder if we could simply do better via using 
> jetty or tomcat in some way?
>
> geir
>
>


Mime
View raw message