{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/6706","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/6706/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/6706/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/6706/events","html_url":"https://github.com/Automattic/wp-calypso/pull/6706","id":165101456,"number":6706,"title":"Purchases: Remove assembler in favor of selector","user":{"login":"Tug","id":230230,"avatar_url":"https://avatars.githubusercontent.com/u/230230?v=3","gravatar_id":"","url":"https://api.github.com/users/Tug","html_url":"https://github.com/Tug","followers_url":"https://api.github.com/users/Tug/followers","following_url":"https://api.github.com/users/Tug/following{/other_user}","gists_url":"https://api.github.com/users/Tug/gists{/gist_id}","starred_url":"https://api.github.com/users/Tug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tug/subscriptions","organizations_url":"https://api.github.com/users/Tug/orgs","repos_url":"https://api.github.com/users/Tug/repos","events_url":"https://api.github.com/users/Tug/events{/privacy}","received_events_url":"https://api.github.com/users/Tug/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Purchases","name":"Purchases","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-12T14:56:47Z","updated_at":"2016-07-13T19:08:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/6706","html_url":"https://github.com/Automattic/wp-calypso/pull/6706","diff_url":"https://github.com/Automattic/wp-calypso/pull/6706.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/6706.patch"},"body":"This PR moves the purchases assembler from the actions to the selector. The idea is to keep raw data from the API into the global store. Selectors are responsible for converting this raw data and adding more props. This PR does not update the actual assembler.\r\n\r\n### Testing instructions\r\n- `git checkout update/purchases-remove-assembler`\r\n- `npm run test-client client/state/purchases`\r\n\r\n### Reviews\r\n- [ ] Tests\r\n- [x] Code\r\n"},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/232455788","html_url":"https://github.com/Automattic/wp-calypso/pull/6706#issuecomment-232455788","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/6706","id":232455788,"user":{"login":"drewblaisdell","id":1130674,"avatar_url":"https://avatars.githubusercontent.com/u/1130674?v=3","gravatar_id":"","url":"https://api.github.com/users/drewblaisdell","html_url":"https://github.com/drewblaisdell","followers_url":"https://api.github.com/users/drewblaisdell/followers","following_url":"https://api.github.com/users/drewblaisdell/following{/other_user}","gists_url":"https://api.github.com/users/drewblaisdell/gists{/gist_id}","starred_url":"https://api.github.com/users/drewblaisdell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewblaisdell/subscriptions","organizations_url":"https://api.github.com/users/drewblaisdell/orgs","repos_url":"https://api.github.com/users/drewblaisdell/repos","events_url":"https://api.github.com/users/drewblaisdell/events{/privacy}","received_events_url":"https://api.github.com/users/drewblaisdell/received_events","type":"User","site_admin":false},"created_at":"2016-07-13T19:08:02Z","updated_at":"2016-07-13T19:08:02Z","body":"I can replicate if I run a bunch of tests at once:\r\n\r\n```bash\r\nfor run in {1..25}; do npm run test-client client/state/purchases/ & done\r\n```\r\n\r\nWe can fix it by setting `this.timeout( 10000 )` [in the before() hook](https://github.com/Automattic/wp-calypso/blob/master/test/test/helpers/use-mockery/index.js#L17) in `useMockery`.\r\n\r\nI added a commit to set the timeout in the `state.purchases.actions` tests, so that we aren't increasing the timeout globally. It is a bit messy - we need to access the `useMockery#before()` context elsewhere so I used `Function.prototype.call` - but it works."}}
{"actor":{"display_login":"drewblaisdell"}}