MarketSquare / robotframework-requests

Robot Framework keyword library wrapper for requests
http://marketsquare.github.io/robotframework-requests/
MIT License
487 stars 280 forks source link

delete all session keyword calls empty_cache method on robot.utils.connection_cache instead of close_all leading port exhaustion #364

Closed Serhiy1 closed 2 years ago

Serhiy1 commented 2 years ago

I have been experiencing at my work has been experiencing random connection timeouts in our azure CI pipelines. The cause may be port exhaustion on the CI machines. The Delete All Sessions keyword calls the empty_cache method on a robot.utils.connection_cache object. But I think that is incorrect. since all it does is remove any references to the session objects and lets the garbage collector deal with it. Instead, the keyword should call the close_all method of connection_cache which actually calls close() on the session objects and then empties the cache.