{"action":"created","comment":{"url":"https://api.github.com/repos/openregister/openregister-java/pulls/comments/93218651","pull_request_review_id":13740013,"id":93218651,"diff_hunk":"@@ -15,22 +14,21 @@\n import static org.junit.Assert.assertThat;\n \n public class EntryMapperTest {\n-    @ClassRule\n-    public static RegisterRule register = new RegisterRule(\"address\");\n+    @Rule\n+    public WipeDatabaseRule wipeDatabaseRule = new WipeDatabaseRule(\"address\");\n \n     @Test\n     public void map_returnsSameDateAndTimeInUTC() throws Exception {\n         String expected = \"2016-07-15T10:00:00Z\";\n         Instant expectedInstant = Instant.parse(expected);\n \n-        DBI dbi = new DBI(\"jdbc:postgresql://localhost:5432/ft_openregister_java?user=postgres&ApplicationName=EntryMapperTest\");\n-        Handle h = dbi.open();\n-        EntryQueryDAO entryQueryDAO = dbi.onDemand(EntryQueryDAO.class);\n+        DBI dbi = new DBI(\"jdbc:postgresql://localhost:5432/ft_openregister_java_address?user=postgres&ApplicationName=EntryMapperTest\");\n \n-        h.execute(\"insert into entry(entry_number, sha256hex, timestamp) values(5, 'abcdef', :timestamp)\",expectedInstant.getEpochSecond());\n-\n-        // this method implicitly invokes EntryMapper\n-        Collection<Entry> allEntriesNoPagination = entryQueryDAO.getAllEntriesNoPagination();\n+        Collection<Entry> allEntriesNoPagination = dbi.withHandle(h -> {","path":"src/test/java/uk/gov/register/db/mappers/EntryMapperTest.java","position":38,"original_position":38,"commit_id":"a5f4d4e2d04dd390c565af107698d9e25f017a97","original_commit_id":"a5f4d4e2d04dd390c565af107698d9e25f017a97","user":{"login":"chr1sdi","id":1702416,"avatar_url":"https://avatars.githubusercontent.com/u/1702416?v=3","gravatar_id":"","url":"https://api.github.com/users/chr1sdi","html_url":"https://github.com/chr1sdi","followers_url":"https://api.github.com/users/chr1sdi/followers","following_url":"https://api.github.com/users/chr1sdi/following{/other_user}","gists_url":"https://api.github.com/users/chr1sdi/gists{/gist_id}","starred_url":"https://api.github.com/users/chr1sdi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chr1sdi/subscriptions","organizations_url":"https://api.github.com/users/chr1sdi/orgs","repos_url":"https://api.github.com/users/chr1sdi/repos","events_url":"https://api.github.com/users/chr1sdi/events{/privacy}","received_events_url":"https://api.github.com/users/chr1sdi/received_events","type":"User","site_admin":false},"body":"The only thing here is that it all will be within the same transaction, previously the changes were committed before querying - just an observation really :)","created_at":"2016-12-20T11:25:50Z","updated_at":"2016-12-20T11:25:50Z","html_url":"https://github.com/openregister/openregister-java/pull/141#discussion_r93218651","pull_request_url":"https://api.github.com/repos/openregister/openregister-java/pulls/141","_links":{"self":{"href":"https://api.github.com/repos/openregister/openregister-java/pulls/comments/93218651"},"html":{"href":"https://github.com/openregister/openregister-java/pull/141#discussion_r93218651"},"pull_request":{"href":"https://api.github.com/repos/openregister/openregister-java/pulls/141"}}},"pull_request":{"url":"https://api.github.com/repos/openregister/openregister-java/pulls/141","id":98598015,"html_url":"https://github.com/openregister/openregister-java/pull/141","diff_url":"https://github.com/openregister/openregister-java/pull/141.diff","patch_url":"https://github.com/openregister/openregister-java/pull/141.patch","issue_url":"https://api.github.com/repos/openregister/openregister-java/issues/141","number":141,"state":"open","locked":false,"title":"Make trackingId a per-register configuration value","user":{"login":"philandstuff","id":581269,"avatar_url":"https://avatars.githubusercontent.com/u/581269?v=3","gravatar_id":"","url":"https://api.github.com/users/philandstuff","html_url":"https://github.com/philandstuff","followers_url":"https://api.github.com/users/philandstuff/followers","following_url":"https://api.github.com/users/philandstuff/following{/other_user}","gists_url":"https://api.github.com/users/philandstuff/gists{/gist_id}","starred_url":"https://api.github.com/users/philandstuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philandstuff/subscriptions","organizations_url":"https://api.github.com/users/philandstuff/orgs","repos_url":"https://api.github.com/users/philandstuff/repos","events_url":"https://api.github.com/users/philandstuff/events{/privacy}","received_events_url":"https://api.github.com/users/philandstuff/received_events","type":"User","site_admin":false},"body":"This rather large PR does several things (sorry):\r\n\r\n - makes `trackingId` a value which is set on a per-register basis.\r\n   This means that you must set the tracking ID for each register in\r\n   the `otherRegisters` config item\r\n - changes the functional tests to create a single app instance, with\r\n   three different registers. this means that many tests no longer\r\n   need to customize the configuration values any more and can share\r\n   the same RegisterRule instance. In some cases I've been able to\r\n   change @Rules to @ClassRules, cutting test times.\r\n - refactors the test code so that we make sure we close all Handles\r\n   we create\r\n\r\nThe new trackingId functionality is tested by the changed\r\nAnalyticsFunctionalTest, which expects different analytical behaviour\r\nfrom different registers within the same app instance.","created_at":"2016-12-19T16:39:28Z","updated_at":"2016-12-20T11:25:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fbb3e2d973719509a5bd0c507f97857ffd03ddfd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openregister/openregister-java/pulls/141/commits","review_comments_url":"https://api.github.com/repos/openregister/openregister-java/pulls/141/comments","review_comment_url":"https://api.github.com/repos/openregister/openregister-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openregister/openregister-java/issues/141/comments","statuses_url":"https://api.github.com/repos/openregister/openregister-java/statuses/a5f4d4e2d04dd390c565af107698d9e25f017a97","head":{"label":"openregister:multi-register-configuration","ref":"multi-register-configuration","sha":"a5f4d4e2d04dd390c565af107698d9e25f017a97","user":{"login":"openregister","id":10206003,"avatar_url":"https://avatars.githubusercontent.com/u/10206003?v=3","gravatar_id":"","url":"https://api.github.com/users/openregister","html_url":"https://github.com/openregister","followers_url":"https://api.github.com/users/openregister/followers","following_url":"https://api.github.com/users/openregister/following{/other_user}","gists_url":"https://api.github.com/users/openregister/gists{/gist_id}","starred_url":"https://api.github.com/users/openregister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openregister/subscriptions","organizations_url":"https://api.github.com/users/openregister/orgs","repos_url":"https://api.github.com/users/openregister/repos","events_url":"https://api.github.com/users/openregister/events{/privacy}","received_events_url":"https://api.github.com/users/openregister/received_events","type":"Organization","site_admin":false},"repo":{"id":62739233,"name":"openregister-java","full_name":"openregister/openregister-java","owner":{"login":"openregister","id":10206003,"avatar_url":"https://avatars.githubusercontent.com/u/10206003?v=3","gravatar_id":"","url":"https://api.github.com/users/openregister","html_url":"https://github.com/openregister","followers_url":"https://api.github.com/users/openregister/followers","following_url":"https://api.github.com/users/openregister/following{/other_user}","gists_url":"https://api.github.com/users/openregister/gists{/gist_id}","starred_url":"https://api.github.com/users/openregister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openregister/subscriptions","organizations_url":"https://api.github.com/users/openregister/orgs","repos_url":"https://api.github.com/users/openregister/repos","events_url":"https://api.github.com/users/openregister/events{/privacy}","received_events_url":"https://api.github.com/users/openregister/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openregister/openregister-java","description":null,"fork":false,"url":"https://api.github.com/repos/openregister/openregister-java","forks_url":"https://api.github.com/repos/openregister/openregister-java/forks","keys_url":"https://api.github.com/repos/openregister/openregister-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openregister/openregister-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openregister/openregister-java/teams","hooks_url":"https://api.github.com/repos/openregister/openregister-java/hooks","issue_events_url":"https://api.github.com/repos/openregister/openregister-java/issues/events{/number}","events_url":"https://api.github.com/repos/openregister/openregister-java/events","assignees_url":"https://api.github.com/repos/openregister/openregister-java/assignees{/user}","branches_url":"https://api.github.com/repos/openregister/openregister-java/branches{/branch}","tags_url":"https://api.github.com/repos/openregister/openregister-java/tags","blobs_url":"https://api.github.com/repos/openregister/openregister-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openregister/openregister-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openregister/openregister-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/openregister/openregister-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openregister/openregister-java/statuses/{sha}","languages_url":"https://api.github.com/repos/openregister/openregister-java/languages","stargazers_url":"https://api.github.com/repos/openregister/openregister-java/stargazers","contributors_url":"https://api.github.com/repos/openregister/openregister-java/contributors","subscribers_url":"https://api.github.com/repos/openregister/openregister-java/subscribers","subscription_url":"https://api.github.com/repos/openregister/openregister-java/subscription","commits_url":"https://api.github.com/repos/openregister/openregister-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/openregister/openregister-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/openregister/openregister-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/openregister/openregister-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/openregister/openregister-java/contents/{+path}","compare_url":"https://api.github.com/repos/openregister/openregister-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openregister/openregister-java/merges","archive_url":"https://api.github.com/repos/openregister/openregister-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openregister/openregister-java/downloads","issues_url":"https://api.github.com/repos/openregister/openregister-java/issues{/number}","pulls_url":"https://api.github.com/repos/openregister/openregister-java/pulls{/number}","milestones_url":"https://api.github.com/repos/openregister/openregister-java/milestones{/number}","notifications_url":"https://api.github.com/repos/openregister/openregister-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openregister/openregister-java/labels{/name}","releases_url":"https://api.github.com/repos/openregister/openregister-java/releases{/id}","deployments_url":"https://api.github.com/repos/openregister/openregister-java/deployments","created_at":"2016-07-06T17:09:50Z","updated_at":"2016-12-08T10:43:11Z","pushed_at":"2016-12-19T16:47:54Z","git_url":"git://github.com/openregister/openregister-java.git","ssh_url":"git@github.com:openregister/openregister-java.git","clone_url":"https://github.com/openregister/openregister-java.git","svn_url":"https://github.com/openregister/openregister-java","homepage":null,"size":15389,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"openregister:master","ref":"master","sha":"e2bdbd48ea6c30b468aa8fbf1d400cd3380a3c33","user":{"login":"openregister","id":10206003,"avatar_url":"https://avatars.githubusercontent.com/u/10206003?v=3","gravatar_id":"","url":"https://api.github.com/users/openregister","html_url":"https://github.com/openregister","followers_url":"https://api.github.com/users/openregister/followers","following_url":"https://api.github.com/users/openregister/following{/other_user}","gists_url":"https://api.github.com/users/openregister/gists{/gist_id}","starred_url":"https://api.github.com/users/openregister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openregister/subscriptions","organizations_url":"https://api.github.com/users/openregister/orgs","repos_url":"https://api.github.com/users/openregister/repos","events_url":"https://api.github.com/users/openregister/events{/privacy}","received_events_url":"https://api.github.com/users/openregister/received_events","type":"Organization","site_admin":false},"repo":{"id":62739233,"name":"openregister-java","full_name":"openregister/openregister-java","owner":{"login":"openregister","id":10206003,"avatar_url":"https://avatars.githubusercontent.com/u/10206003?v=3","gravatar_id":"","url":"https://api.github.com/users/openregister","html_url":"https://github.com/openregister","followers_url":"https://api.github.com/users/openregister/followers","following_url":"https://api.github.com/users/openregister/following{/other_user}","gists_url":"https://api.github.com/users/openregister/gists{/gist_id}","starred_url":"https://api.github.com/users/openregister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openregister/subscriptions","organizations_url":"https://api.github.com/users/openregister/orgs","repos_url":"https://api.github.com/users/openregister/repos","events_url":"https://api.github.com/users/openregister/events{/privacy}","received_events_url":"https://api.github.com/users/openregister/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openregister/openregister-java","description":null,"fork":false,"url":"https://api.github.com/repos/openregister/openregister-java","forks_url":"https://api.github.com/repos/openregister/openregister-java/forks","keys_url":"https://api.github.com/repos/openregister/openregister-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openregister/openregister-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openregister/openregister-java/teams","hooks_url":"https://api.github.com/repos/openregister/openregister-java/hooks","issue_events_url":"https://api.github.com/repos/openregister/openregister-java/issues/events{/number}","events_url":"https://api.github.com/repos/openregister/openregister-java/events","assignees_url":"https://api.github.com/repos/openregister/openregister-java/assignees{/user}","branches_url":"https://api.github.com/repos/openregister/openregister-java/branches{/branch}","tags_url":"https://api.github.com/repos/openregister/openregister-java/tags","blobs_url":"https://api.github.com/repos/openregister/openregister-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openregister/openregister-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openregister/openregister-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/openregister/openregister-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openregister/openregister-java/statuses/{sha}","languages_url":"https://api.github.com/repos/openregister/openregister-java/languages","stargazers_url":"https://api.github.com/repos/openregister/openregister-java/stargazers","contributors_url":"https://api.github.com/repos/openregister/openregister-java/contributors","subscribers_url":"https://api.github.com/repos/openregister/openregister-java/subscribers","subscription_url":"https://api.github.com/repos/openregister/openregister-java/subscription","commits_url":"https://api.github.com/repos/openregister/openregister-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/openregister/openregister-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/openregister/openregister-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/openregister/openregister-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/openregister/openregister-java/contents/{+path}","compare_url":"https://api.github.com/repos/openregister/openregister-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openregister/openregister-java/merges","archive_url":"https://api.github.com/repos/openregister/openregister-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openregister/openregister-java/downloads","issues_url":"https://api.github.com/repos/openregister/openregister-java/issues{/number}","pulls_url":"https://api.github.com/repos/openregister/openregister-java/pulls{/number}","milestones_url":"https://api.github.com/repos/openregister/openregister-java/milestones{/number}","notifications_url":"https://api.github.com/repos/openregister/openregister-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openregister/openregister-java/labels{/name}","releases_url":"https://api.github.com/repos/openregister/openregister-java/releases{/id}","deployments_url":"https://api.github.com/repos/openregister/openregister-java/deployments","created_at":"2016-07-06T17:09:50Z","updated_at":"2016-12-08T10:43:11Z","pushed_at":"2016-12-19T16:47:54Z","git_url":"git://github.com/openregister/openregister-java.git","ssh_url":"git@github.com:openregister/openregister-java.git","clone_url":"https://github.com/openregister/openregister-java.git","svn_url":"https://github.com/openregister/openregister-java","homepage":null,"size":15389,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openregister/openregister-java/pulls/141"},"html":{"href":"https://github.com/openregister/openregister-java/pull/141"},"issue":{"href":"https://api.github.com/repos/openregister/openregister-java/issues/141"},"comments":{"href":"https://api.github.com/repos/openregister/openregister-java/issues/141/comments"},"review_comments":{"href":"https://api.github.com/repos/openregister/openregister-java/pulls/141/comments"},"review_comment":{"href":"https://api.github.com/repos/openregister/openregister-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openregister/openregister-java/pulls/141/commits"},"statuses":{"href":"https://api.github.com/repos/openregister/openregister-java/statuses/a5f4d4e2d04dd390c565af107698d9e25f017a97"}}}}
{"actor":{"display_login":"chr1sdi"}}