{"action":"created","issue":{"url":"https://api.github.com/repos/swcarpentry/amy/issues/900","repository_url":"https://api.github.com/repos/swcarpentry/amy","labels_url":"https://api.github.com/repos/swcarpentry/amy/issues/900/labels{/name}","comments_url":"https://api.github.com/repos/swcarpentry/amy/issues/900/comments","events_url":"https://api.github.com/repos/swcarpentry/amy/issues/900/events","html_url":"https://github.com/swcarpentry/amy/pull/900","id":166120867,"number":900,"title":"Speeding up tests with --keepdb and --parallel","user":{"login":"chrismedrela","id":1645996,"avatar_url":"https://avatars.githubusercontent.com/u/1645996?v=3","gravatar_id":"","url":"https://api.github.com/users/chrismedrela","html_url":"https://github.com/chrismedrela","followers_url":"https://api.github.com/users/chrismedrela/followers","following_url":"https://api.github.com/users/chrismedrela/following{/other_user}","gists_url":"https://api.github.com/users/chrismedrela/gists{/gist_id}","starred_url":"https://api.github.com/users/chrismedrela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrismedrela/subscriptions","organizations_url":"https://api.github.com/users/chrismedrela/orgs","repos_url":"https://api.github.com/users/chrismedrela/repos","events_url":"https://api.github.com/users/chrismedrela/events{/privacy}","received_events_url":"https://api.github.com/users/chrismedrela/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/swcarpentry/amy/labels/development","name":"development","color":"e6e6e6"}],"state":"open","locked":false,"assignee":{"login":"chrismedrela","id":1645996,"avatar_url":"https://avatars.githubusercontent.com/u/1645996?v=3","gravatar_id":"","url":"https://api.github.com/users/chrismedrela","html_url":"https://github.com/chrismedrela","followers_url":"https://api.github.com/users/chrismedrela/followers","following_url":"https://api.github.com/users/chrismedrela/following{/other_user}","gists_url":"https://api.github.com/users/chrismedrela/gists{/gist_id}","starred_url":"https://api.github.com/users/chrismedrela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrismedrela/subscriptions","organizations_url":"https://api.github.com/users/chrismedrela/orgs","repos_url":"https://api.github.com/users/chrismedrela/repos","events_url":"https://api.github.com/users/chrismedrela/events{/privacy}","received_events_url":"https://api.github.com/users/chrismedrela/received_events","type":"User","site_admin":false},"assignees":[{"login":"chrismedrela","id":1645996,"avatar_url":"https://avatars.githubusercontent.com/u/1645996?v=3","gravatar_id":"","url":"https://api.github.com/users/chrismedrela","html_url":"https://github.com/chrismedrela","followers_url":"https://api.github.com/users/chrismedrela/followers","following_url":"https://api.github.com/users/chrismedrela/following{/other_user}","gists_url":"https://api.github.com/users/chrismedrela/gists{/gist_id}","starred_url":"https://api.github.com/users/chrismedrela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrismedrela/subscriptions","organizations_url":"https://api.github.com/users/chrismedrela/orgs","repos_url":"https://api.github.com/users/chrismedrela/repos","events_url":"https://api.github.com/users/chrismedrela/events{/privacy}","received_events_url":"https://api.github.com/users/chrismedrela/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/swcarpentry/amy/milestones/32","html_url":"https://github.com/swcarpentry/amy/milestones/v1.8","labels_url":"https://api.github.com/repos/swcarpentry/amy/milestones/32/labels","id":1892745,"number":32,"title":"v1.8","description":"","creator":{"login":"pbanaszkiewicz","id":72821,"avatar_url":"https://avatars.githubusercontent.com/u/72821?v=3","gravatar_id":"","url":"https://api.github.com/users/pbanaszkiewicz","html_url":"https://github.com/pbanaszkiewicz","followers_url":"https://api.github.com/users/pbanaszkiewicz/followers","following_url":"https://api.github.com/users/pbanaszkiewicz/following{/other_user}","gists_url":"https://api.github.com/users/pbanaszkiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/pbanaszkiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbanaszkiewicz/subscriptions","organizations_url":"https://api.github.com/users/pbanaszkiewicz/orgs","repos_url":"https://api.github.com/users/pbanaszkiewicz/repos","events_url":"https://api.github.com/users/pbanaszkiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/pbanaszkiewicz/received_events","type":"User","site_admin":false},"open_issues":35,"closed_issues":15,"state":"open","created_at":"2016-07-19T19:02:01Z","updated_at":"2016-08-24T19:28:04Z","due_on":"2016-08-19T00:00:00Z","closed_at":null},"comments":9,"created_at":"2016-07-18T15:25:50Z","updated_at":"2016-08-27T16:29:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/swcarpentry/amy/pulls/900","html_url":"https://github.com/swcarpentry/amy/pull/900","diff_url":"https://github.com/swcarpentry/amy/pull/900.diff","patch_url":"https://github.com/swcarpentry/amy/pull/900.patch"},"body":"This PR introduces two improvements:\r\n\r\n1. Use in-file database instead of in-memory one while running tests with `--keepdb`. This change lets us preserve database between test launches and, therefore, avoid the overhead of applying migrations during each test launch. Note that a new fresh in-memory database is still used by default, that is when you don't set `--keepdb` flag (i.e. `python3 manage.py test`).\r\n\r\n2. `TestCase.subTest` cannot be used when tests are launched in parallel, that is with `--parallel` flag. To bypass this limitation, we use a dummy `subTest` mock when when tests are run in parallel.\r\n\r\nThe first improvement saves 30 seconds on my machine once the database is created. All test suite takes now 50 seconds instead of 80 seconds.\r\n\r\nThe second improvement in combination with the first one let you speed up tests twice (25 seconds instead of 50 seconds on my machine, my proc has 4 cores). "},"comment":{"url":"https://api.github.com/repos/swcarpentry/amy/issues/comments/242926846","html_url":"https://github.com/swcarpentry/amy/pull/900#issuecomment-242926846","issue_url":"https://api.github.com/repos/swcarpentry/amy/issues/900","id":242926846,"user":{"login":"chrismedrela","id":1645996,"avatar_url":"https://avatars.githubusercontent.com/u/1645996?v=3","gravatar_id":"","url":"https://api.github.com/users/chrismedrela","html_url":"https://github.com/chrismedrela","followers_url":"https://api.github.com/users/chrismedrela/followers","following_url":"https://api.github.com/users/chrismedrela/following{/other_user}","gists_url":"https://api.github.com/users/chrismedrela/gists{/gist_id}","starred_url":"https://api.github.com/users/chrismedrela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrismedrela/subscriptions","organizations_url":"https://api.github.com/users/chrismedrela/orgs","repos_url":"https://api.github.com/users/chrismedrela/repos","events_url":"https://api.github.com/users/chrismedrela/events{/privacy}","received_events_url":"https://api.github.com/users/chrismedrela/received_events","type":"User","site_admin":false},"created_at":"2016-08-27T16:29:42Z","updated_at":"2016-08-27T16:29:42Z","body":"@pbanaszkiewicz pong"}}
{"actor":{"display_login":"chrismedrela"}}