{"action":"created","issue":{"url":"https://api.github.com/repos/appium/java-client/issues/283","labels_url":"https://api.github.com/repos/appium/java-client/issues/283/labels{/name}","comments_url":"https://api.github.com/repos/appium/java-client/issues/283/comments","events_url":"https://api.github.com/repos/appium/java-client/issues/283/events","html_url":"https://github.com/appium/java-client/issues/283","id":123776590,"number":283,"title":"AppiumDriverLocalService dosent spawn on MultiThreading","user":{"login":"saikrishna321","id":4045041,"avatar_url":"https://avatars.githubusercontent.com/u/4045041?v=3","gravatar_id":"","url":"https://api.github.com/users/saikrishna321","html_url":"https://github.com/saikrishna321","followers_url":"https://api.github.com/users/saikrishna321/followers","following_url":"https://api.github.com/users/saikrishna321/following{/other_user}","gists_url":"https://api.github.com/users/saikrishna321/gists{/gist_id}","starred_url":"https://api.github.com/users/saikrishna321/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saikrishna321/subscriptions","organizations_url":"https://api.github.com/users/saikrishna321/orgs","repos_url":"https://api.github.com/users/saikrishna321/repos","events_url":"https://api.github.com/users/saikrishna321/events{/privacy}","received_events_url":"https://api.github.com/users/saikrishna321/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/appium/java-client/labels/Needs%20investigation","name":"Needs investigation","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-24T08:45:19Z","updated_at":"2015-12-27T03:03:55Z","closed_at":null,"body":"@TikhomirovSergey  i was trying to execute the appium android test in parallel where i wanted to start the appium-server programmatically for every thread. \r\n\r\nTestNG by default provides  a way were u can run methods in parallel and set the thread-count. When i trigger the appium server with AppiumLocalSerive it always hooks to a single thread. \r\n\r\nWhen i start the appium server as we do from command line it works fine. I have a sample project to reproduce it. \r\n\r\nhttps://github.com/saikrishna321/TestNGParallelThreads\r\n\r\nWhen i set the ParallelMode.CLASSES  i see the the appium server and the application launched on two thread(two devices) as expected. Please check the gist for logs \r\n\r\n\r\n\r\nhttps://gist.github.com/saikrishna321/8a2e49ccc080a3faf014\r\n\r\n\r\n\r\nWhen i set the ParallelMode.METHODS i dont see the methods executing in parallel, check the gist for logs and also i noticed the AfterClass for one of the has not completed, i see the process still running\r\n\r\n\r\n\r\nhttps://gist.github.com/saikrishna321/6592f680dee7d70be59c\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/appium/java-client/issues/comments/167376528","html_url":"https://github.com/appium/java-client/issues/283#issuecomment-167376528","issue_url":"https://api.github.com/repos/appium/java-client/issues/283","id":167376528,"user":{"login":"saikrishna321","id":4045041,"avatar_url":"https://avatars.githubusercontent.com/u/4045041?v=3","gravatar_id":"","url":"https://api.github.com/users/saikrishna321","html_url":"https://github.com/saikrishna321","followers_url":"https://api.github.com/users/saikrishna321/followers","following_url":"https://api.github.com/users/saikrishna321/following{/other_user}","gists_url":"https://api.github.com/users/saikrishna321/gists{/gist_id}","starred_url":"https://api.github.com/users/saikrishna321/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saikrishna321/subscriptions","organizations_url":"https://api.github.com/users/saikrishna321/orgs","repos_url":"https://api.github.com/users/saikrishna321/repos","events_url":"https://api.github.com/users/saikrishna321/events{/privacy}","received_events_url":"https://api.github.com/users/saikrishna321/received_events","type":"User","site_admin":false},"created_at":"2015-12-27T03:03:55Z","updated_at":"2015-12-27T03:03:55Z","body":"@TikhomirovSergey  More info: i'm running my test with TestNG framework and below the testng.xml used to trigger the tests\r\n\r\n```\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!DOCTYPE suite SYSTEM \"http://testng.org/testng-1.0.dtd\">\r\n<suite thread-count=\"2\" name=\"Suite\" parallel=\"methods\">\r\n\t<test name=\"Test\">\r\n\t\t<classes>\r\n\t\t\t<class name=\"com.test.classes.TestNGMethodSelector\">\r\n\t\t\t\t<methods>\r\n\t\t\t\t\t<include name=\"methodOne\" />\r\n\t\t\t\t\t<include name=\"methodTwo\" />\r\n\t\t\t\t</methods>\r\n\t\t\t</class>\r\n\t\t\t<class name=\"com.test.classes.DemoClassWithManyMethodsTest\">\r\n\t\t\t\t<methods>\r\n\t\t\t\t\t<include name=\"methodOne_1\" />\r\n\t\t\t\t\t<include name=\"methodTwo_2\" />\r\n\t\t\t\t</methods>\r\n\t\t\t</class>\r\n\t\t</classes>\r\n\t</test> <!-- Test -->\r\n</suite> <!-- Suite -->\r\n\r\n\r\n```"}}