{"push_id":849782391,"size":1,"distinct_size":1,"ref":"refs/heads/parallel_vmdb_tests","head":"5f19935554a0d7244ac94161dbe9f63b384fd5b6","before":"0c453f35dc2790d3c17feece465b081391e06739","commits":[{"sha":"5f19935554a0d7244ac94161dbe9f63b384fd5b6","author":{"email":"ea442e001a5636eeee710090794bb7eb2e3459c8@redhat.com","name":"Joe Rafaniello"},"message":"Add POC parallel vmdb tests implementation.\n\nhttps://github.com/grosser/parallel_tests\n\nparallel_tests will automatically divide the test files in N groups and\nrun each group of test files in a separate process using a different database.\n\nNote, N is the number of processors on the machine or the\nPARALLEL_TEST_PROCESSORS environment variable.\n\nThe reason to do this is to use all CPU cores available to us and in\nthe case of travis containers, we get [2 CPU cores](http://docs.travis-ci.com/user/ci-environment/#Virtualization-environments).\n\nLocally, on SSD, the vmdb suite goes from ~21 minutes to ~11 minutes\nwhen utilizing 2 CPU cores.\n\nTo do this:\n* database.yml must be changed to dynamically name the db based on an\nenvironment variable that parallel_tests sets internally (TEST_ENV_NUMBER).\nNote, if you run locally using the changed database.yml, it will work because\nthe \"single\" core default for our project is the same vmdb_test we've always\nused.\n\n* We have to run our database setup through parallel_test so it can\nsetup each of the N databases: `parallel_test -e \"bundle exec rake test:vmdb:setup\"`.\n\n* Finally, we have to provide the spec file patterns directly to parallel_tests\nso it knows what spec files need to be divided into N groups.\n\n #### Before\n\n```\n\nFinished in 21 minutes 17 seconds\n10191 examples, 0 failure, 3 pending\n\nRandomized with seed 10983\n```\n\n ### After\n\n```\n # Initial output showing the parallelized tests:\n2 processes for 704 specs, ~ 352 specs per process\n\n...\n\n # First process statistics\nFinished in 10 minutes 21 seconds\n5460 examples, 0 failure, 1 pending\n...\n\n # Second process statistics\nFinished in 10 minutes 31 seconds\n4731 examples, 0 failures, 2 pending\n...\n\n # Total suite statistics\nRandomized with seed 4955\n\n10191 examples, 1 failure, 3 pendings\n\nTook 649 seconds (10:49)\n```","distinct":true,"url":"https://api.github.com/repos/jrafanie/manageiq/commits/5f19935554a0d7244ac94161dbe9f63b384fd5b6"}]}