{"action":"created","issue":{"url":"https://api.github.com/repos/theforeman/foreman/issues/2299","labels_url":"https://api.github.com/repos/theforeman/foreman/issues/2299/labels{/name}","comments_url":"https://api.github.com/repos/theforeman/foreman/issues/2299/comments","events_url":"https://api.github.com/repos/theforeman/foreman/issues/2299/events","html_url":"https://github.com/theforeman/foreman/pull/2299","id":67370958,"number":2299,"title":"Fixes #10106 - Make tests run in parallel","user":{"login":"eLobato","id":598891,"avatar_url":"https://avatars.githubusercontent.com/u/598891?v=3","gravatar_id":"","url":"https://api.github.com/users/eLobato","html_url":"https://github.com/eLobato","followers_url":"https://api.github.com/users/eLobato/followers","following_url":"https://api.github.com/users/eLobato/following{/other_user}","gists_url":"https://api.github.com/users/eLobato/gists{/gist_id}","starred_url":"https://api.github.com/users/eLobato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eLobato/subscriptions","organizations_url":"https://api.github.com/users/eLobato/orgs","repos_url":"https://api.github.com/users/eLobato/repos","events_url":"https://api.github.com/users/eLobato/events{/privacy}","received_events_url":"https://api.github.com/users/eLobato/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/theforeman/foreman/labels/Needs%20re-review","name":"Needs re-review","color":"0052cc"},{"url":"https://api.github.com/repos/theforeman/foreman/labels/Needs%20testing","name":"Needs testing","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-09T14:12:18Z","updated_at":"2015-07-24T11:47:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/2299","html_url":"https://github.com/theforeman/foreman/pull/2299","diff_url":"https://github.com/theforeman/foreman/pull/2299.diff","patch_url":"https://github.com/theforeman/foreman/pull/2299.patch"},"body":"This should force our test runs to use all available cores in the machine and create a process/database/cache file store for each of them. Each process will only run a subset of all tests, and all of these will run in parallel. \r\n\r\nIn order to run tests in parallel and test this PR you would need to change database.yaml to:\r\n```\r\ntest:\r\n  database: yourproject_test<%= ENV['TEST_ENV_NUMBER'] %>\r\n```\r\nand run:\r\n\r\n`rake parallel:create` <- to create the databases\r\n`rake parallel:migrate` <- equivalent to db:test:migrate\r\n\r\n`rake parallel:test` will run the tests. In my machine (4 processes), total completion time went down from nearly 10 minutes to around 5 minutes. I would expect it to be more like 2.5 minutes so I will investigate how to make it faster."},"comment":{"url":"https://api.github.com/repos/theforeman/foreman/issues/comments/124497604","html_url":"https://github.com/theforeman/foreman/pull/2299#issuecomment-124497604","issue_url":"https://api.github.com/repos/theforeman/foreman/issues/2299","id":124497604,"user":{"login":"domcleal","id":482089,"avatar_url":"https://avatars.githubusercontent.com/u/482089?v=3","gravatar_id":"","url":"https://api.github.com/users/domcleal","html_url":"https://github.com/domcleal","followers_url":"https://api.github.com/users/domcleal/followers","following_url":"https://api.github.com/users/domcleal/following{/other_user}","gists_url":"https://api.github.com/users/domcleal/gists{/gist_id}","starred_url":"https://api.github.com/users/domcleal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domcleal/subscriptions","organizations_url":"https://api.github.com/users/domcleal/orgs","repos_url":"https://api.github.com/users/domcleal/repos","events_url":"https://api.github.com/users/domcleal/events{/privacy}","received_events_url":"https://api.github.com/users/domcleal/received_events","type":"User","site_admin":false},"created_at":"2015-07-24T11:47:57Z","updated_at":"2015-07-24T11:47:57Z","body":"Seems better, thanks.  I had a failure on the HostMailerTest strangely, but I don't know why (expectation's backwards again):\r\n\r\n<pre>\r\n  1) Failure:\r\nHostMailerTest#test_0006_error_state sends mail with correct headers [/home/dcleal/code/foreman/foreman/test/unit/host_mailer_test.rb:58]:\r\nExpected [\"Foreman-noreply@redhat.com\"] to include nil.\r\n</pre>\r\n\r\nIt's not a big enough concern for me to not merge it, but I wonder why it happens to me anyway!\r\n\r\nThere are some inline comments above to address too."}}