{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-mobile/android-components/pulls/comments/241408758","pull_request_review_id":184672339,"id":241408758,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTQwODc1OA==","diff_hunk":"@@ -154,4 +167,46 @@ class EventsStorageEngineTest {\n         assertEquals(\"[[0,\\\"telemetry\\\",\\\"test_event_clear\\\",\\\"test_event_object\\\",null,null]]\",\n             snapshot.toString())\n     }\n+\n+    @Test\n+    fun `test sending of event ping when it fills up`() {\n+        val server = MockWebServer()\n+        server.enqueue(MockResponse().setBody(\"OK\"))\n+\n+        EventsStorageEngine.clearAllStores()\n+        val click = EventMetricType(\n+            disabled = false,\n+            category = \"ui\",\n+            lifetime = Lifetime.Ping,\n+            name = \"click\",\n+            sendInPings = listOf(\"default\"),\n+            objects = listOf(\"buttonA\")\n+        )\n+\n+        val realClient = Glean.httpPingUploader\n+        val testConfig = Glean.configuration.copy(","path":"components/service/glean/src/test/java/mozilla/components/service/glean/storages/EventsStorageEngineTest.kt","position":48,"original_position":48,"commit_id":"21ab5cbcb5c1bd3107587b43d7e7bd50165a2e0b","original_commit_id":"21ab5cbcb5c1bd3107587b43d7e7bd50165a2e0b","user":{"login":"mdboom","id":38294,"node_id":"MDQ6VXNlcjM4Mjk0","avatar_url":"https://avatars3.githubusercontent.com/u/38294?v=4","gravatar_id":"","url":"https://api.github.com/users/mdboom","html_url":"https://github.com/mdboom","followers_url":"https://api.github.com/users/mdboom/followers","following_url":"https://api.github.com/users/mdboom/following{/other_user}","gists_url":"https://api.github.com/users/mdboom/gists{/gist_id}","starred_url":"https://api.github.com/users/mdboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdboom/subscriptions","organizations_url":"https://api.github.com/users/mdboom/orgs","repos_url":"https://api.github.com/users/mdboom/repos","events_url":"https://api.github.com/users/mdboom/events{/privacy}","received_events_url":"https://api.github.com/users/mdboom/received_events","type":"User","site_admin":false},"body":"I'm not sure I follow...","created_at":"2018-12-13T13:59:32Z","updated_at":"2018-12-13T13:59:33Z","html_url":"https://github.com/mozilla-mobile/android-components/pull/1572#discussion_r241408758","pull_request_url":"https://api.github.com/repos/mozilla-mobile/android-components/pulls/1572","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/mozilla-mobile/android-components/pulls/comments/241408758"},"html":{"href":"https://github.com/mozilla-mobile/android-components/pull/1572#discussion_r241408758"},"pull_request":{"href":"https://api.github.com/repos/mozilla-mobile/android-components/pulls/1572"}},"in_reply_to_id":241403490},"pull_request":{"url":"https://api.github.com/repos/mozilla-mobile/android-components/pulls/1572","id":238378537,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4Mzc4NTM3","html_url":"https://github.com/mozilla-mobile/android-components/pull/1572","diff_url":"https://github.com/mozilla-mobile/android-components/pull/1572.diff","patch_url":"https://github.com/mozilla-mobile/android-components/pull/1572.patch","issue_url":"https://api.github.com/repos/mozilla-mobile/android-components/issues/1572","number":1572,"state":"open","locked":false,"title":"[glean] 1510552: Send the event ping","user":{"login":"mdboom","id":38294,"node_id":"MDQ6VXNlcjM4Mjk0","avatar_url":"https://avatars3.githubusercontent.com/u/38294?v=4","gravatar_id":"","url":"https://api.github.com/users/mdboom","html_url":"https://github.com/mdboom","followers_url":"https://api.github.com/users/mdboom/followers","following_url":"https://api.github.com/users/mdboom/following{/other_user}","gists_url":"https://api.github.com/users/mdboom/gists{/gist_id}","starred_url":"https://api.github.com/users/mdboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdboom/subscriptions","organizations_url":"https://api.github.com/users/mdboom/orgs","repos_url":"https://api.github.com/users/mdboom/repos","events_url":"https://api.github.com/users/mdboom/events{/privacy}","received_events_url":"https://api.github.com/users/mdboom/received_events","type":"User","site_admin":false},"body":"This sets up the event ping to send when (a) going to background and (b) when the event storage engine of a particular store exceeds `MAX_EVENTS` items.\r\n\r\nThis includes a refactor of the `Glean` object into a class and a singleton instance to make it easier to create one-off instances for testing.\r\n\r\nThis also rewrites an unrelated test to send pings to a testing webserver rather than catching the contents in a mock.  I wasn't aware we already had this infrastructure when I wrote that original test and I think it's much better to mock less.","created_at":"2018-12-13T12:51:09Z","updated_at":"2018-12-13T13:59:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f96cd594979c5df0aa3e593119d9ea1fc0ce25b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-mobile/android-components/pulls/1572/commits","review_comments_url":"https://api.github.com/repos/mozilla-mobile/android-components/pulls/1572/comments","review_comment_url":"https://api.github.com/repos/mozilla-mobile/android-components/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-mobile/android-components/issues/1572/comments","statuses_url":"https://api.github.com/repos/mozilla-mobile/android-components/statuses/21ab5cbcb5c1bd3107587b43d7e7bd50165a2e0b","head":{"label":"mdboom:event-ping","ref":"event-ping","sha":"21ab5cbcb5c1bd3107587b43d7e7bd50165a2e0b","user":{"login":"mdboom","id":38294,"node_id":"MDQ6VXNlcjM4Mjk0","avatar_url":"https://avatars3.githubusercontent.com/u/38294?v=4","gravatar_id":"","url":"https://api.github.com/users/mdboom","html_url":"https://github.com/mdboom","followers_url":"https://api.github.com/users/mdboom/followers","following_url":"https://api.github.com/users/mdboom/following{/other_user}","gists_url":"https://api.github.com/users/mdboom/gists{/gist_id}","starred_url":"https://api.github.com/users/mdboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdboom/subscriptions","organizations_url":"https://api.github.com/users/mdboom/orgs","repos_url":"https://api.github.com/users/mdboom/repos","events_url":"https://api.github.com/users/mdboom/events{/privacy}","received_events_url":"https://api.github.com/users/mdboom/received_events","type":"User","site_admin":false},"repo":{"id":154378599,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQzNzg1OTk=","name":"android-components","full_name":"mdboom/android-components","private":false,"owner":{"login":"mdboom","id":38294,"node_id":"MDQ6VXNlcjM4Mjk0","avatar_url":"https://avatars3.githubusercontent.com/u/38294?v=4","gravatar_id":"","url":"https://api.github.com/users/mdboom","html_url":"https://github.com/mdboom","followers_url":"https://api.github.com/users/mdboom/followers","following_url":"https://api.github.com/users/mdboom/following{/other_user}","gists_url":"https://api.github.com/users/mdboom/gists{/gist_id}","starred_url":"https://api.github.com/users/mdboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdboom/subscriptions","organizations_url":"https://api.github.com/users/mdboom/orgs","repos_url":"https://api.github.com/users/mdboom/repos","events_url":"https://api.github.com/users/mdboom/events{/privacy}","received_events_url":"https://api.github.com/users/mdboom/received_events","type":"User","site_admin":false},"html_url":"https://github.com/mdboom/android-components","description":"A collection of Android libraries to build browsers or browser-like applications.","fork":true,"url":"https://api.github.com/repos/mdboom/android-components","forks_url":"https://api.github.com/repos/mdboom/android-components/forks","keys_url":"https://api.github.com/repos/mdboom/android-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdboom/android-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdboom/android-components/teams","hooks_url":"https://api.github.com/repos/mdboom/android-components/hooks","issue_events_url":"https://api.github.com/repos/mdboom/android-components/issues/events{/number}","events_url":"https://api.github.com/repos/mdboom/android-components/events","assignees_url":"https://api.github.com/repos/mdboom/android-components/assignees{/user}","branches_url":"https://api.github.com/repos/mdboom/android-components/branches{/branch}","tags_url":"https://api.github.com/repos/mdboom/android-components/tags","blobs_url":"https://api.github.com/repos/mdboom/android-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdboom/android-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdboom/android-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdboom/android-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdboom/android-components/statuses/{sha}","languages_url":"https://api.github.com/repos/mdboom/android-components/languages","stargazers_url":"https://api.github.com/repos/mdboom/android-components/stargazers","contributors_url":"https://api.github.com/repos/mdboom/android-components/contributors","subscribers_url":"https://api.github.com/repos/mdboom/android-components/subscribers","subscription_url":"https://api.github.com/repos/mdboom/android-components/subscription","commits_url":"https://api.github.com/repos/mdboom/android-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdboom/android-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdboom/android-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdboom/android-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/mdboom/android-components/contents/{+path}","compare_url":"https://api.github.com/repos/mdboom/android-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdboom/android-components/merges","archive_url":"https://api.github.com/repos/mdboom/android-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdboom/android-components/downloads","issues_url":"https://api.github.com/repos/mdboom/android-components/issues{/number}","pulls_url":"https://api.github.com/repos/mdboom/android-components/pulls{/number}","milestones_url":"https://api.github.com/repos/mdboom/android-components/milestones{/number}","notifications_url":"https://api.github.com/repos/mdboom/android-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdboom/android-components/labels{/name}","releases_url":"https://api.github.com/repos/mdboom/android-components/releases{/id}","deployments_url":"https://api.github.com/repos/mdboom/android-components/deployments","created_at":"2018-10-23T18:35:53Z","updated_at":"2018-11-07T14:50:21Z","pushed_at":"2018-12-13T12:57:16Z","git_url":"git://github.com/mdboom/android-components.git","ssh_url":"git@github.com:mdboom/android-components.git","clone_url":"https://github.com/mdboom/android-components.git","svn_url":"https://github.com/mdboom/android-components","homepage":"https://mozilla-mobile.github.io/android-components/","size":40070,"stargazers_count":0,"watchers_count":0,"language":"Kotlin","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-mobile:master","ref":"master","sha":"96e94ca5d653e040e3f2cfb26ac6ffae8a470e07","user":{"login":"mozilla-mobile","id":22351667,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMzUxNjY3","avatar_url":"https://avatars3.githubusercontent.com/u/22351667?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla-mobile","html_url":"https://github.com/mozilla-mobile","followers_url":"https://api.github.com/users/mozilla-mobile/followers","following_url":"https://api.github.com/users/mozilla-mobile/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-mobile/subscriptions","organizations_url":"https://api.github.com/users/mozilla-mobile/orgs","repos_url":"https://api.github.com/users/mozilla-mobile/repos","events_url":"https://api.github.com/users/mozilla-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":126199585,"node_id":"MDEwOlJlcG9zaXRvcnkxMjYxOTk1ODU=","name":"android-components","full_name":"mozilla-mobile/android-components","private":false,"owner":{"login":"mozilla-mobile","id":22351667,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMzUxNjY3","avatar_url":"https://avatars3.githubusercontent.com/u/22351667?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla-mobile","html_url":"https://github.com/mozilla-mobile","followers_url":"https://api.github.com/users/mozilla-mobile/followers","following_url":"https://api.github.com/users/mozilla-mobile/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-mobile/subscriptions","organizations_url":"https://api.github.com/users/mozilla-mobile/orgs","repos_url":"https://api.github.com/users/mozilla-mobile/repos","events_url":"https://api.github.com/users/mozilla-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-mobile/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mozilla-mobile/android-components","description":"A collection of Android libraries to build browsers or browser-like applications.","fork":false,"url":"https://api.github.com/repos/mozilla-mobile/android-components","forks_url":"https://api.github.com/repos/mozilla-mobile/android-components/forks","keys_url":"https://api.github.com/repos/mozilla-mobile/android-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-mobile/android-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-mobile/android-components/teams","hooks_url":"https://api.github.com/repos/mozilla-mobile/android-components/hooks","issue_events_url":"https://api.github.com/repos/mozilla-mobile/android-components/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-mobile/android-components/events","assignees_url":"https://api.github.com/repos/mozilla-mobile/android-components/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-mobile/android-components/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-mobile/android-components/tags","blobs_url":"https://api.github.com/repos/mozilla-mobile/android-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-mobile/android-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-mobile/android-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-mobile/android-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-mobile/android-components/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-mobile/android-components/languages","stargazers_url":"https://api.github.com/repos/mozilla-mobile/android-components/stargazers","contributors_url":"https://api.github.com/repos/mozilla-mobile/android-components/contributors","subscribers_url":"https://api.github.com/repos/mozilla-mobile/android-components/subscribers","subscription_url":"https://api.github.com/repos/mozilla-mobile/android-components/subscription","commits_url":"https://api.github.com/repos/mozilla-mobile/android-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-mobile/android-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-mobile/android-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-mobile/android-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-mobile/android-components/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-mobile/android-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-mobile/android-components/merges","archive_url":"https://api.github.com/repos/mozilla-mobile/android-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-mobile/android-components/downloads","issues_url":"https://api.github.com/repos/mozilla-mobile/android-components/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-mobile/android-components/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-mobile/android-components/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-mobile/android-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-mobile/android-components/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-mobile/android-components/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla-mobile/android-components/deployments","created_at":"2018-03-21T15:24:03Z","updated_at":"2018-12-13T13:58:34Z","pushed_at":"2018-12-13T13:58:30Z","git_url":"git://github.com/mozilla-mobile/android-components.git","ssh_url":"git@github.com:mozilla-mobile/android-components.git","clone_url":"https://github.com/mozilla-mobile/android-components.git","svn_url":"https://github.com/mozilla-mobile/android-components","homepage":"https://mozilla-mobile.github.io/android-components/","size":40079,"stargazers_count":531,"watchers_count":531,"language":"Kotlin","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":108,"mirror_url":null,"archived":false,"open_issues_count":293,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":108,"open_issues":293,"watchers":531,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-mobile/android-components/pulls/1572"},"html":{"href":"https://github.com/mozilla-mobile/android-components/pull/1572"},"issue":{"href":"https://api.github.com/repos/mozilla-mobile/android-components/issues/1572"},"comments":{"href":"https://api.github.com/repos/mozilla-mobile/android-components/issues/1572/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-mobile/android-components/pulls/1572/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-mobile/android-components/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-mobile/android-components/pulls/1572/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-mobile/android-components/statuses/21ab5cbcb5c1bd3107587b43d7e7bd50165a2e0b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mdboom"}}