lantunes / fixd

An HTTP Server Fixture for Testing HTTP Clients and mocking web services, and a Java Micro Web Framework
http://bigtesting.org/fixd
Apache License 2.0
41 stars 6 forks source link

Problems when using pooled conncetions for testing #34

Open kiview opened 9 years ago

kiview commented 9 years ago

I'm using fixd for testing my Spring-Boot application. After configuring RestTemplate to use HttpComponentsClientHttpRequestFactory (which has connection pooling enabled), my tests start to fail when run as suite. Running single tests is no problem.

I call server.stop(); in my cleanup method.

It seems the RestTemplate reuses already closed connections and so the tests fall. I'm no entirely sure if this is a problem with fixd or with HttpComponentsClientHttpRequestFactory

lantunes commented 9 years ago

Hi, sorry for the late reply. I don't seem to get notifications from GitHub when an issue is opened here. Perhaps I haven't set a setting somewhere.

Anyhow, do you have a code snippet? If you provide me with some sample code I could try to reproduce it and see if I could understand what is going on.

Thanks!