{"action":"created","issue":{"url":"https://api.github.com/repos/apache/brooklyn-server/issues/329","repository_url":"https://api.github.com/repos/apache/brooklyn-server","labels_url":"https://api.github.com/repos/apache/brooklyn-server/issues/329/labels{/name}","comments_url":"https://api.github.com/repos/apache/brooklyn-server/issues/329/comments","events_url":"https://api.github.com/repos/apache/brooklyn-server/issues/329/events","html_url":"https://github.com/apache/brooklyn-server/pull/329","id":176673967,"number":329,"title":"fix long-running unit test","user":{"login":"ahgittin","id":496540,"avatar_url":"https://avatars.githubusercontent.com/u/496540?v=3","gravatar_id":"","url":"https://api.github.com/users/ahgittin","html_url":"https://github.com/ahgittin","followers_url":"https://api.github.com/users/ahgittin/followers","following_url":"https://api.github.com/users/ahgittin/following{/other_user}","gists_url":"https://api.github.com/users/ahgittin/gists{/gist_id}","starred_url":"https://api.github.com/users/ahgittin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahgittin/subscriptions","organizations_url":"https://api.github.com/users/ahgittin/orgs","repos_url":"https://api.github.com/users/ahgittin/repos","events_url":"https://api.github.com/users/ahgittin/events{/privacy}","received_events_url":"https://api.github.com/users/ahgittin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-13T15:34:36Z","updated_at":"2016-09-22T14:57:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/brooklyn-server/pulls/329","html_url":"https://github.com/apache/brooklyn-server/pull/329","diff_url":"https://github.com/apache/brooklyn-server/pull/329.diff","patch_url":"https://github.com/apache/brooklyn-server/pull/329.patch"},"body":"/cc @aledsage is this the best fix?  (it stalls for 2m most the time when doing `mvn clean install` without this.  haven't thought too much about it though!)"},"comment":{"url":"https://api.github.com/repos/apache/brooklyn-server/issues/comments/248928673","html_url":"https://github.com/apache/brooklyn-server/pull/329#issuecomment-248928673","issue_url":"https://api.github.com/repos/apache/brooklyn-server/issues/329","id":248928673,"user":{"login":"aledsage","id":593113,"avatar_url":"https://avatars.githubusercontent.com/u/593113?v=3","gravatar_id":"","url":"https://api.github.com/users/aledsage","html_url":"https://github.com/aledsage","followers_url":"https://api.github.com/users/aledsage/followers","following_url":"https://api.github.com/users/aledsage/following{/other_user}","gists_url":"https://api.github.com/users/aledsage/gists{/gist_id}","starred_url":"https://api.github.com/users/aledsage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aledsage/subscriptions","organizations_url":"https://api.github.com/users/aledsage/orgs","repos_url":"https://api.github.com/users/aledsage/repos","events_url":"https://api.github.com/users/aledsage/events{/privacy}","received_events_url":"https://api.github.com/users/aledsage/received_events","type":"User","site_admin":false},"created_at":"2016-09-22T14:57:23Z","updated_at":"2016-09-22T14:57:23Z","body":"@ahgittin I've had a look at what is causing it...\r\n\r\nWhen it hangs (1 in 50 times for me, when run in Eclipse with `@Test(invocationCount=1000)`), the `start` thread is blocked by:\r\n\r\n```\r\n\"brooklyn-execmanager-DGVR7wxb-22\" daemon prio=5 tid=0x00007fb4c4477800 nid=0x1ea03 waiting on condition [0x000070000e233000]\r\n   java.lang.Thread.State: TIMED_WAITING (sleeping)\r\n        at java.lang.Thread.sleep(Native Method)\r\n        at org.apache.brooklyn.util.time.Time.sleep(Time.java:353)\r\n        at org.apache.brooklyn.entity.software.base.SoftwareProcessImpl.waitForEntityStart(SoftwareProcessImpl.java:568)\r\n        at org.apache.brooklyn.entity.software.base.SoftwareProcessImpl.postDriverStart(SoftwareProcessImpl.java:277)\r\n        at org.apache.brooklyn.entity.software.base.SoftwareProcessDriverLifecycleEffectorTasks.postStartCustom(SoftwareProcessDriverLifecycleEffectorTasks.java:173)\r\n        at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$PostStartTask.run(MachineLifecycleEffectorTasks.java:625)\r\n        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)\r\n        at org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:359)\r\n        at org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:519)\r\n        at java.util.concurrent.FutureTask.run(FutureTask.java:262)\r\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\r\n        at java.lang.Thread.run(Thread.java:745)\r\n```\r\n\r\nA better fix is therefore to change the setUp method to:\r\n\r\n```\r\n        entity = app.createAndManageChild(EntitySpec.create(EmptySoftwareProcess.class)\r\n                .configure(EmptySoftwareProcess.START_TIMEOUT, Duration.millis(100)));\r\n```\r\n\r\nIt worked (without hanging) 1000 times a row for me with this fix."}}
{"actor":{"display_login":"aledsage"}}