GitHub PullRequestReviewCommentEvent at 2014-02-18 14:57:25
Repository: sky
Actor: snormore
Payload: {"comment":{"url":"https://api.github.com/repos/skydb/sky/pulls/comments/9825856","id":9825856,"diff_hunk":"@@ -197,24 +228,179 @@ func TestServerStreamUpdateEventsFlushesOnPeriod(t *testing.T) {\n \t\t// Send a second event.\n \t\tclient.Write(`{\"id\":\"xyz\",\"table\":\"foo\",\"timestamp\":\"2012-01-01T03:00:00Z\",\"data\":{\"bar\":\"myValue2\"}}` + \"\\n\")\n \n+\t\t// This is necessary in order to flush.\n \t\tclient.Flush()\n+\t\ttime.Sleep(time.Duration(s.StreamFlushPeriod) * time.Second)\n+\t\ttime.Sleep(100 * time.Millisecond)\n+\n+\t\t// Assert that the events were flushed\n+\t\tresp, err := sendTestHttpRequest(\"GET\", \"http://localhost:8586/tables/foo/objects/xyz/events\", \"application/json\", \"\")\n+\t\tassert.NoError(t, err)\n+\t\tassertResponse(t, resp, 200, `[{\"data\":{\"bar\":\"myValue\",\"baz\":12},\"timestamp\":\"2012-01-01T02:00:00Z\"},{\"data\":{\"bar\":\"myValue2\"},\"timestamp\":\"2012-01-01T03:00:00Z\"}]`+\"\\n\", \"GET /events failed.\")\n+\n+\t\t// Send a single event.\n+\t\tclient.Write(`{\"id\":\"abc\",\"table\":\"foo\",\"timestamp\":\"2012-01-01T02:00:00Z\",\"data\":{\"bar\":\"myValue\", \"baz\":12}}` + \"\\n\")","path":"server/server_event_handlers_test.go","position":81,"original_position":81,"commit_id":"efbf9b09d417b79f4491170bc568a84434b5884d","original_commit_id":"efbf9b09d417b79f4491170bc568a84434b5884d","user":{"login":"snormore","id":182290,"avatar_url":"https://gravatar.com/avatar/638b74268bc82b9b536332ccc95e8a78?d=https%3A%2F%2Fidenticons.github.com%2F73dd6ec5cb363db3a794d27561cb8e85.png&r=x","gravatar_id":"638b74268bc82b9b536332ccc95e8a78","url":"https://api.github.com/users/snormore","html_url":"https://github.com/snormore","followers_url":"https://api.github.com/users/snormore/followers","following_url":"https://api.github.com/users/snormore/following{/other_user}","gists_url":"https://api.github.com/users/snormore/gists{/gist_id}","starred_url":"https://api.github.com/users/snormore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snormore/subscriptions","organizations_url":"https://api.github.com/users/snormore/orgs","repos_url":"https://api.github.com/users/snormore/repos","events_url":"https://api.github.com/users/snormore/events{/privacy}","received_events_url":"https://api.github.com/users/snormore/received_events","type":"User","site_admin":false},"body":"`client.Flush()` after these as well to make it obvious that the client flush is not the same as server flush.","created_at":"2014-02-18T14:57:25Z","updated_at":"2014-02-18T14:57:25Z","html_url":"https://github.com/skydb/sky/pull/178#discussion_r9825856","pull_request_url":"https://api.github.com/repos/skydb/sky/pulls/178","_links":{"self":{"href":"https://api.github.com/repos/skydb/sky/pulls/comments/9825856"},"html":{"href":"https://github.com/skydb/sky/pull/178#discussion_r9825856"},"pull_request":{"href":"https://api.github.com/repos/skydb/sky/pulls/178"}}}}