{"action":"created","issue":{"url":"https://api.github.com/repos/rest-assured/rest-assured/issues/713","repository_url":"https://api.github.com/repos/rest-assured/rest-assured","labels_url":"https://api.github.com/repos/rest-assured/rest-assured/issues/713/labels{/name}","comments_url":"https://api.github.com/repos/rest-assured/rest-assured/issues/713/comments","events_url":"https://api.github.com/repos/rest-assured/rest-assured/issues/713/events","html_url":"https://github.com/rest-assured/rest-assured/issues/713","id":163894641,"number":713,"title":"rest-assured: Request timeouts","user":{"login":"manoj7shekhawat","id":5961390,"avatar_url":"https://avatars.githubusercontent.com/u/5961390?v=3","gravatar_id":"","url":"https://api.github.com/users/manoj7shekhawat","html_url":"https://github.com/manoj7shekhawat","followers_url":"https://api.github.com/users/manoj7shekhawat/followers","following_url":"https://api.github.com/users/manoj7shekhawat/following{/other_user}","gists_url":"https://api.github.com/users/manoj7shekhawat/gists{/gist_id}","starred_url":"https://api.github.com/users/manoj7shekhawat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manoj7shekhawat/subscriptions","organizations_url":"https://api.github.com/users/manoj7shekhawat/orgs","repos_url":"https://api.github.com/users/manoj7shekhawat/repos","events_url":"https://api.github.com/users/manoj7shekhawat/events{/privacy}","received_events_url":"https://api.github.com/users/manoj7shekhawat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-05T16:41:20Z","updated_at":"2016-07-05T17:40:13Z","closed_at":null,"body":"Hi,\r\n\r\nI'm using \r\n`testCompile('com.jayway.restassured:rest-assured:2.4.0')`\r\n\r\nAnd my request stuck at:\r\n```\r\nResponse response = given().relaxedHTTPSValidation()\r\n.spec(requestSpecBuilder.build()).body(createBody()).when().post(\"/some/version/api\").thenReturn();\r\n```\r\n\r\nEventually TestNG timeouts with below error stack:\r\n```\r\norg.testng.internal.thread.ThreadTimeoutException: Method org.testng.internal.TestNGMethod.executeResources() didn't finish within the time-out 420000\r\n\tat java.lang.reflect.InvocationTargetException.<init>(InvocationTargetException.java:72)\r\n\tat sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)\r\n\tat groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1210)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:810)\r\n\tat com.jayway.restassured.internal.RequestSpecificationImpl.invokeMethod(RequestSpecificationImpl.groovy)\r\n\tat org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.call(PogoInterceptableSite.java:48)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:149)\r\n\tat com.jayway.restassured.internal.filter.SendRequestFilter.filter(SendRequestFilter.groovy:31)\r\n\tat com.jayway.restassured.filter.Filter$filter.call(Unknown Source)\r\n\tat com.jayway.restassured.internal.filter.FilterContextImpl.next(FilterContextImpl.groovy:49)\r\n\tat com.jayway.restassured.filter.FilterContext$next.call(Unknown Source)\r\n\tat com.jayway.restassured.internal.RequestSpecificationImpl.invokeFilterChain(RequestSpecificationImpl.groovy:956)\r\n\tat sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)\r\n\tat groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1210)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:810)\r\n\tat com.jayway.restassured.internal.RequestSpecificationImpl.invokeMethod(RequestSpecificationImpl.groovy)\r\n\tat org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.call(PogoInterceptableSite.java:48)\r\n\tat org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.callCurrent(PogoInterceptableSite.java:58)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:182)\r\n\tat com.jayway.restassured.internal.RequestSpecificationImpl.applyPathParamsAndSendRequest(RequestSpecificationImpl.groovy:1414)\r\n\tat com.jayway.restassured.internal.RequestSpecificationImpl.this$2$applyPathParamsAndSendRequest(RequestSpecificationImpl.groovy)\r\n\tat sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)\r\n\tat groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1210)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)\r\n\tat groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:810)\r\n\tat com.jayway.restassured.internal.RequestSpecificationImpl.invokeMethod(RequestSpecificationImpl.groovy)\r\n\tat org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.call(PogoInterceptableSite.java:48)\r\n\tat org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.callCurrent(PogoInterceptableSite.java:58)\r\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:182)\r\n\tat com.jayway.restassured.internal.RequestSpecificationImpl.post(RequestSpecificationImpl.groovy:154)\r\n\tat com.jayway.restassured.internal.RequestSpecificationImpl.post(RequestSpecificationImpl.groovy)\r\n\tat oracle.idaas.oauth.endpoint.Token.generateAccessToken(Token.java:100)\r\n\tat oracle.idaas.oauth.tasks.AccessTokenMain.generateTokensWithoutUsers(AccessTokenMain.java:125)\r\n\tat oracle.idaas.oauth.tasks.AccessTokenMain.reGenerateAccessTokens(AccessTokenMain.java:77)\r\n\tat oracle.idaas.idpsRest.provider.HttpAccess.refreshAccessTokens(HttpAccess.java:1036)\r\n\tat oracle.idaas.idpsRest.provider.HttpAccess.GETservice(HttpAccess.java:393)\r\n\tat oracle.idaas.idpsRest.testProviders.CommonResourcesREST.LISTresource(CommonResourcesREST.java:2658)\r\n\tat oracle.idaas.idpsRest.testProviders.CommonResourcesREST.executeREST(CommonResourcesREST.java:152)\r\n\tat oracle.idaas.idpsRest.testProviders.CommonResources.executeOperations(CommonResources.java:240)\r\n\tat oracle.idaas.idpsRest.testProviders.RestResources.executeResources(RestResources.java:179)\r\n\tat sun.reflect.GeneratedMethodAccessor164.invoke(Unknown Source)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)\r\n\tat org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:46)\r\n\tat org.testng.internal.InvokeMethodRunnable.run(InvokeMethodRunnable.java:37)\r\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n```\r\n\r\nBoth HttpAccess.java and Token.java classes have same rest-assured config in them as:\r\n```\r\nstatic {\r\n\t\tRestAssured.config =\r\n\t\t\t\tnewConfig().httpClient(httpClientConfig().httpClientFactory(new HttpClientConfig.HttpClientFactory() {\r\n\t\t\t\t\tDefaultHttpClient client = new DefaultHttpClient();\r\n\t\t\t\t\tClientConnectionManager mgr = client.getConnectionManager();\r\n\t\t\t\t\tHttpParams params = client.getParams();\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic HttpClient createHttpClient() {\r\n\t\t\t\t\t\tHttpClient client = new DefaultHttpClient(\r\n\t\t\t\t\t\t\t\tnew ThreadSafeClientConnManager(params, mgr.getSchemeRegistry()), params);\r\n\t\t\t\t\t\treturn client;\r\n\t\t\t\t\t}\r\n\t\t\t\t}).reuseHttpClientInstance());\r\n\t} \r\n```\r\n\r\nAfter this timeout exception, all next calls to any REST API via HttpAccess.java class stuck and eventually TestNG timeouts all those requests.\r\n \r\nI'm not sure if this is a bug in my code or rest-assured library issue. Can somebody confirm this. "},"comment":{"url":"https://api.github.com/repos/rest-assured/rest-assured/issues/comments/230548605","html_url":"https://github.com/rest-assured/rest-assured/issues/713#issuecomment-230548605","issue_url":"https://api.github.com/repos/rest-assured/rest-assured/issues/713","id":230548605,"user":{"login":"manoj7shekhawat","id":5961390,"avatar_url":"https://avatars.githubusercontent.com/u/5961390?v=3","gravatar_id":"","url":"https://api.github.com/users/manoj7shekhawat","html_url":"https://github.com/manoj7shekhawat","followers_url":"https://api.github.com/users/manoj7shekhawat/followers","following_url":"https://api.github.com/users/manoj7shekhawat/following{/other_user}","gists_url":"https://api.github.com/users/manoj7shekhawat/gists{/gist_id}","starred_url":"https://api.github.com/users/manoj7shekhawat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manoj7shekhawat/subscriptions","organizations_url":"https://api.github.com/users/manoj7shekhawat/orgs","repos_url":"https://api.github.com/users/manoj7shekhawat/repos","events_url":"https://api.github.com/users/manoj7shekhawat/events{/privacy}","received_events_url":"https://api.github.com/users/manoj7shekhawat/received_events","type":"User","site_admin":false},"created_at":"2016-07-05T17:40:13Z","updated_at":"2016-07-05T17:40:13Z","body":"Most probably it's due to my bad code, where I am creating a deadlock.\r\n\r\nI'm updating my code and will again run my tests. If refactoring code solves this issue, then I'll close this bug."}}
{"actor":{"display_login":"manoj7shekhawat"}}