making HttpClient always close connection solves the test case