wininet: Add tests for asynchronous HttpSendRequestEx/HttpEndRequest.

Nicolas Le Cam niko.lecam at
Sat Apr 11 08:20:06 CDT 2009

2009/4/11 Hans Leidekker <hans at>:
> On Saturday 11 April 2009 05:14:25 Nicolas Le Cam wrote:
>> Your patch makes the test timeout on my machine
>> (
>> Timeout occurs in HttpSendRequestEx_test on HttpEndRequest call which
>> hang. Disabling test_async_HttpSendRequestEx makes it pass again.
>> After some tests it seems to be a timing issue, but I haven't been
>> able to find a real solution. Just that waiting at least 500msec
>> between the two HttpEndRequest, or waiting at least 150ms after the
>> WaitForSingleObject that follow the second HttpEndRequest makes test
>> pass. Reading response doesn't change anything.
>> After reading a little bit about how this works I don't see anything
>> wrong. Perhaps you will.
> Windows keeps a cache of connections, so when the second test is executed
> within the cache timeout it will use the same connection and we will not
> see certain notifications, such as INTERNET_STATUS_CLOSING_CONNECTION.
> I have found that sleeping for 2 seconds is enough to defeat the cache.
>  -Hans

Is there no way to avoid use of cached connections or to clean the
cache before those two tests ?
Perhaps moving both tests up and down instead of sleeping at end of
them could help.

Nicolas Le Cam

More information about the wine-devel mailing list