{"action":"created","issue":{"url":"https://api.github.com/repos/wmanley/stb-tester-service/issues/20","labels_url":"https://api.github.com/repos/wmanley/stb-tester-service/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/wmanley/stb-tester-service/issues/20/comments","events_url":"https://api.github.com/repos/wmanley/stb-tester-service/issues/20/events","html_url":"https://github.com/wmanley/stb-tester-service/pull/20","id":67140380,"number":20,"title":"Status display of current job","user":{"login":"drothlis","id":12424,"avatar_url":"https://avatars.githubusercontent.com/u/12424?v=3","gravatar_id":"","url":"https://api.github.com/users/drothlis","html_url":"https://github.com/drothlis","followers_url":"https://api.github.com/users/drothlis/followers","following_url":"https://api.github.com/users/drothlis/following{/other_user}","gists_url":"https://api.github.com/users/drothlis/gists{/gist_id}","starred_url":"https://api.github.com/users/drothlis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drothlis/subscriptions","organizations_url":"https://api.github.com/users/drothlis/orgs","repos_url":"https://api.github.com/users/drothlis/repos","events_url":"https://api.github.com/users/drothlis/events{/privacy}","received_events_url":"https://api.github.com/users/drothlis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-04-08T14:16:59Z","updated_at":"2015-04-22T15:15:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/wmanley/stb-tester-service/pulls/20","html_url":"https://github.com/wmanley/stb-tester-service/pull/20","diff_url":"https://github.com/wmanley/stb-tester-service/pull/20.diff","patch_url":"https://github.com/wmanley/stb-tester-service/pull/20.patch"},"body":"WIP\r\n\r\nTODO:\r\n\r\n- [x] Back-end reports start & end times from memory\r\n- [x] Self-tests for start/end time\r\n- [x] Back-end reports test pass/fail/error counts as they come in\r\n- [x] Front-end displays it\r\n- ~~Back-end caches mongo query of pass/fail/error counts~~ (leave it until we implement server-sent events)\r\n- [x] Back-end remembers the above across restarts\r\n- [x] Convert from UTC to user's timezone, in the browser (timezone reported by the browser?)\r\n- [ ] e2e-tests\r\n- [x] [Encode start & end timestamps as ISO 8601](http://flask.pocoo.org/snippets/119/)\r\n- Address comments from Will's review:\r\n  - [x] I'd like to see some tests for the start time/end time stuff in service.\r\n  - [x] I think it'd be better to pass results in to the constructor of TestJob rather than in here.\r\n  - [x] What's the use case for getting old results?\r\n  - [x] Use await_job_completion here.\r\n  - [x] No need to check status_code.\r\n  - [x] check that they both happen, and in order.\r\n\r\nSo far it's looking like this:\r\n\r\n![current-status-display](https://cloud.githubusercontent.com/assets/12424/7258697/2284a7a0-e856-11e4-9f09-1ad27eca7b6b.png)\r\n"},"comment":{"url":"https://api.github.com/repos/wmanley/stb-tester-service/issues/comments/95230737","html_url":"https://github.com/wmanley/stb-tester-service/pull/20#issuecomment-95230737","issue_url":"https://api.github.com/repos/wmanley/stb-tester-service/issues/20","id":95230737,"user":{"login":"wmanley","id":494659,"avatar_url":"https://avatars.githubusercontent.com/u/494659?v=3","gravatar_id":"","url":"https://api.github.com/users/wmanley","html_url":"https://github.com/wmanley","followers_url":"https://api.github.com/users/wmanley/followers","following_url":"https://api.github.com/users/wmanley/following{/other_user}","gists_url":"https://api.github.com/users/wmanley/gists{/gist_id}","starred_url":"https://api.github.com/users/wmanley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmanley/subscriptions","organizations_url":"https://api.github.com/users/wmanley/orgs","repos_url":"https://api.github.com/users/wmanley/repos","events_url":"https://api.github.com/users/wmanley/events{/privacy}","received_events_url":"https://api.github.com/users/wmanley/received_events","type":"User","site_admin":false},"created_at":"2015-04-22T15:15:51Z","updated_at":"2015-04-22T15:15:51Z","body":"From test-pack.bundle:\r\n\r\n    +def test_sleeping_and_then_failing():\r\n    +    \"\"\"\"This test is a slow test to check that the result_count data is being\r\n    +    updated between test-runs.\r\n    +    \"\"\"\r\n    +    from time import sleep\r\n    +    sleep(1)\r\n    +    sleep(1)\r\n    +    sleep(1)\r\n    +    assert False\r\n\r\nI think we'd get away with sleeping just once for 1 second."}}