{"action":"created","comment":{"url":"https://api.github.com/repos/kaazing/metrics/pulls/comments/35900615","id":35900615,"diff_hunk":"@@ -18,33 +18,22 @@\n  * specific language governing permissions and limitations\n  * under the License.\n  */\n-\n package org.kaazing.monitoring.reader;\n \n-import org.kaazing.monitoring.reader.api.MetricsCollector;\n-import org.kaazing.monitoring.reader.impl.MetricsCollectorAgrona;\n-import org.slf4j.Logger;\n-import org.slf4j.LoggerFactory;\n-\n-/**\n- * Factory class that returns a MetricsCollector instance\n- */\n-public class MetricsCollectorFactory {\n+import org.junit.Test;\n+import org.kaazing.monitoring.reader.exception.MetricsReaderException;\n \n-    private static final Logger LOGGER = LoggerFactory.getLogger(MetricsCollectorFactory.class);\n+public class CollectorFactoryTest {\n \n-    /**\n-     * Initializes a MetricCollector instance\n-     * @return MetricsCollectorAgrona\n-     */\n-    public static MetricsCollector getInstance() {\n-        Configuration config = new Configuration();\n+    @Test\n+    public void testCollectorFactoryCanLoadConfig() throws Exception {\n+        CollectorFactory collector = new CollectorFactory(\"test\");\n \n-        if (!config.loadConfigFile()) {\n-            LOGGER.error(\"There was a problem with the configuration file. Exiting application.\");\n-            return null;\n+        try {\n+            collector.initialize();\n+        } catch (MetricsReaderException e) {\n+            throw new AssertionError();\n         }\n-\n-        return new MetricsCollectorAgrona(config);\n     }\n-}\n+\n+}","path":"reader/src/test/java/org/kaazing/monitoring/reader/CollectorFactoryTest.java","position":45,"original_position":45,"commit_id":"809af1c82c8c49447ee0ceb9b05c1a89df6b9660","original_commit_id":"809af1c82c8c49447ee0ceb9b05c1a89df6b9660","user":{"login":"cmebarrow","id":3606936,"avatar_url":"https://avatars.githubusercontent.com/u/3606936?v=3","gravatar_id":"","url":"https://api.github.com/users/cmebarrow","html_url":"https://github.com/cmebarrow","followers_url":"https://api.github.com/users/cmebarrow/followers","following_url":"https://api.github.com/users/cmebarrow/following{/other_user}","gists_url":"https://api.github.com/users/cmebarrow/gists{/gist_id}","starred_url":"https://api.github.com/users/cmebarrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmebarrow/subscriptions","organizations_url":"https://api.github.com/users/cmebarrow/orgs","repos_url":"https://api.github.com/users/cmebarrow/repos","events_url":"https://api.github.com/users/cmebarrow/events{/privacy}","received_events_url":"https://api.github.com/users/cmebarrow/received_events","type":"User","site_admin":false},"body":"Missing EOL","created_at":"2015-07-30T18:06:16Z","updated_at":"2015-07-30T18:06:16Z","html_url":"https://github.com/kaazing/metrics/pull/7#discussion_r35900615","pull_request_url":"https://api.github.com/repos/kaazing/metrics/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/kaazing/metrics/pulls/comments/35900615"},"html":{"href":"https://github.com/kaazing/metrics/pull/7#discussion_r35900615"},"pull_request":{"href":"https://api.github.com/repos/kaazing/metrics/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/kaazing/metrics/pulls/7","id":39179599,"html_url":"https://github.com/kaazing/metrics/pull/7","diff_url":"https://github.com/kaazing/metrics/pull/7.diff","patch_url":"https://github.com/kaazing/metrics/pull/7.patch","issue_url":"https://api.github.com/repos/kaazing/metrics/issues/7","number":7,"state":"open","locked":false,"title":"Added changes for supporting multiple gateways on the same host and merged metrics refactoring from Marina's fork (removed StringManager and latestException)","user":{"login":"irina-mitrea-luxoft","id":11956567,"avatar_url":"https://avatars.githubusercontent.com/u/11956567?v=3","gravatar_id":"","url":"https://api.github.com/users/irina-mitrea-luxoft","html_url":"https://github.com/irina-mitrea-luxoft","followers_url":"https://api.github.com/users/irina-mitrea-luxoft/followers","following_url":"https://api.github.com/users/irina-mitrea-luxoft/following{/other_user}","gists_url":"https://api.github.com/users/irina-mitrea-luxoft/gists{/gist_id}","starred_url":"https://api.github.com/users/irina-mitrea-luxoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irina-mitrea-luxoft/subscriptions","organizations_url":"https://api.github.com/users/irina-mitrea-luxoft/orgs","repos_url":"https://api.github.com/users/irina-mitrea-luxoft/repos","events_url":"https://api.github.com/users/irina-mitrea-luxoft/events{/privacy}","received_events_url":"https://api.github.com/users/irina-mitrea-luxoft/received_events","type":"User","site_admin":false},"body":"Added changes for supporting multiple gateways on the same host and merged latestException and Agrona file String support from Marina's fork","created_at":"2015-07-03T14:29:38Z","updated_at":"2015-07-30T18:06:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"35e2a5a7ba4a38e047a55d14b33abab95056f1c3","assignee":{"login":"cmebarrow","id":3606936,"avatar_url":"https://avatars.githubusercontent.com/u/3606936?v=3","gravatar_id":"","url":"https://api.github.com/users/cmebarrow","html_url":"https://github.com/cmebarrow","followers_url":"https://api.github.com/users/cmebarrow/followers","following_url":"https://api.github.com/users/cmebarrow/following{/other_user}","gists_url":"https://api.github.com/users/cmebarrow/gists{/gist_id}","starred_url":"https://api.github.com/users/cmebarrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmebarrow/subscriptions","organizations_url":"https://api.github.com/users/cmebarrow/orgs","repos_url":"https://api.github.com/users/cmebarrow/repos","events_url":"https://api.github.com/users/cmebarrow/events{/privacy}","received_events_url":"https://api.github.com/users/cmebarrow/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kaazing/metrics/pulls/7/commits","review_comments_url":"https://api.github.com/repos/kaazing/metrics/pulls/7/comments","review_comment_url":"https://api.github.com/repos/kaazing/metrics/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kaazing/metrics/issues/7/comments","statuses_url":"https://api.github.com/repos/kaazing/metrics/statuses/809af1c82c8c49447ee0ceb9b05c1a89df6b9660","head":{"label":"irina-mitrea-luxoft:develop","ref":"develop","sha":"809af1c82c8c49447ee0ceb9b05c1a89df6b9660","user":{"login":"irina-mitrea-luxoft","id":11956567,"avatar_url":"https://avatars.githubusercontent.com/u/11956567?v=3","gravatar_id":"","url":"https://api.github.com/users/irina-mitrea-luxoft","html_url":"https://github.com/irina-mitrea-luxoft","followers_url":"https://api.github.com/users/irina-mitrea-luxoft/followers","following_url":"https://api.github.com/users/irina-mitrea-luxoft/following{/other_user}","gists_url":"https://api.github.com/users/irina-mitrea-luxoft/gists{/gist_id}","starred_url":"https://api.github.com/users/irina-mitrea-luxoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irina-mitrea-luxoft/subscriptions","organizations_url":"https://api.github.com/users/irina-mitrea-luxoft/orgs","repos_url":"https://api.github.com/users/irina-mitrea-luxoft/repos","events_url":"https://api.github.com/users/irina-mitrea-luxoft/events{/privacy}","received_events_url":"https://api.github.com/users/irina-mitrea-luxoft/received_events","type":"User","site_admin":false},"repo":{"id":37838794,"name":"metrics","full_name":"irina-mitrea-luxoft/metrics","owner":{"login":"irina-mitrea-luxoft","id":11956567,"avatar_url":"https://avatars.githubusercontent.com/u/11956567?v=3","gravatar_id":"","url":"https://api.github.com/users/irina-mitrea-luxoft","html_url":"https://github.com/irina-mitrea-luxoft","followers_url":"https://api.github.com/users/irina-mitrea-luxoft/followers","following_url":"https://api.github.com/users/irina-mitrea-luxoft/following{/other_user}","gists_url":"https://api.github.com/users/irina-mitrea-luxoft/gists{/gist_id}","starred_url":"https://api.github.com/users/irina-mitrea-luxoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irina-mitrea-luxoft/subscriptions","organizations_url":"https://api.github.com/users/irina-mitrea-luxoft/orgs","repos_url":"https://api.github.com/users/irina-mitrea-luxoft/repos","events_url":"https://api.github.com/users/irina-mitrea-luxoft/events{/privacy}","received_events_url":"https://api.github.com/users/irina-mitrea-luxoft/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/irina-mitrea-luxoft/metrics","description":"Metrics gathering and monitoring for Kaazing Gateway","fork":true,"url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics","forks_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/forks","keys_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/teams","hooks_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/hooks","issue_events_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/issues/events{/number}","events_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/events","assignees_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/assignees{/user}","branches_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/branches{/branch}","tags_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/tags","blobs_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/git/refs{/sha}","trees_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/statuses/{sha}","languages_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/languages","stargazers_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/stargazers","contributors_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/contributors","subscribers_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/subscribers","subscription_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/subscription","commits_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/commits{/sha}","git_commits_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/git/commits{/sha}","comments_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/comments{/number}","issue_comment_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/issues/comments{/number}","contents_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/contents/{+path}","compare_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/merges","archive_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/downloads","issues_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/issues{/number}","pulls_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/pulls{/number}","milestones_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/milestones{/number}","notifications_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/labels{/name}","releases_url":"https://api.github.com/repos/irina-mitrea-luxoft/metrics/releases{/id}","created_at":"2015-06-22T05:22:02Z","updated_at":"2015-06-22T05:22:03Z","pushed_at":"2015-07-29T19:00:16Z","git_url":"git://github.com/irina-mitrea-luxoft/metrics.git","ssh_url":"git@github.com:irina-mitrea-luxoft/metrics.git","clone_url":"https://github.com/irina-mitrea-luxoft/metrics.git","svn_url":"https://github.com/irina-mitrea-luxoft/metrics","homepage":"http://kaazing.org","size":215,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"kaazing:develop","ref":"develop","sha":"c0ad909a6b5615f2876c078591f70c7d88438ba3","user":{"login":"kaazing","id":1056680,"avatar_url":"https://avatars.githubusercontent.com/u/1056680?v=3","gravatar_id":"","url":"https://api.github.com/users/kaazing","html_url":"https://github.com/kaazing","followers_url":"https://api.github.com/users/kaazing/followers","following_url":"https://api.github.com/users/kaazing/following{/other_user}","gists_url":"https://api.github.com/users/kaazing/gists{/gist_id}","starred_url":"https://api.github.com/users/kaazing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaazing/subscriptions","organizations_url":"https://api.github.com/users/kaazing/orgs","repos_url":"https://api.github.com/users/kaazing/repos","events_url":"https://api.github.com/users/kaazing/events{/privacy}","received_events_url":"https://api.github.com/users/kaazing/received_events","type":"Organization","site_admin":false},"repo":{"id":36033826,"name":"metrics","full_name":"kaazing/metrics","owner":{"login":"kaazing","id":1056680,"avatar_url":"https://avatars.githubusercontent.com/u/1056680?v=3","gravatar_id":"","url":"https://api.github.com/users/kaazing","html_url":"https://github.com/kaazing","followers_url":"https://api.github.com/users/kaazing/followers","following_url":"https://api.github.com/users/kaazing/following{/other_user}","gists_url":"https://api.github.com/users/kaazing/gists{/gist_id}","starred_url":"https://api.github.com/users/kaazing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaazing/subscriptions","organizations_url":"https://api.github.com/users/kaazing/orgs","repos_url":"https://api.github.com/users/kaazing/repos","events_url":"https://api.github.com/users/kaazing/events{/privacy}","received_events_url":"https://api.github.com/users/kaazing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaazing/metrics","description":"Metrics gathering and monitoring for Kaazing Gateway","fork":false,"url":"https://api.github.com/repos/kaazing/metrics","forks_url":"https://api.github.com/repos/kaazing/metrics/forks","keys_url":"https://api.github.com/repos/kaazing/metrics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaazing/metrics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaazing/metrics/teams","hooks_url":"https://api.github.com/repos/kaazing/metrics/hooks","issue_events_url":"https://api.github.com/repos/kaazing/metrics/issues/events{/number}","events_url":"https://api.github.com/repos/kaazing/metrics/events","assignees_url":"https://api.github.com/repos/kaazing/metrics/assignees{/user}","branches_url":"https://api.github.com/repos/kaazing/metrics/branches{/branch}","tags_url":"https://api.github.com/repos/kaazing/metrics/tags","blobs_url":"https://api.github.com/repos/kaazing/metrics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaazing/metrics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaazing/metrics/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaazing/metrics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaazing/metrics/statuses/{sha}","languages_url":"https://api.github.com/repos/kaazing/metrics/languages","stargazers_url":"https://api.github.com/repos/kaazing/metrics/stargazers","contributors_url":"https://api.github.com/repos/kaazing/metrics/contributors","subscribers_url":"https://api.github.com/repos/kaazing/metrics/subscribers","subscription_url":"https://api.github.com/repos/kaazing/metrics/subscription","commits_url":"https://api.github.com/repos/kaazing/metrics/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaazing/metrics/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaazing/metrics/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaazing/metrics/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaazing/metrics/contents/{+path}","compare_url":"https://api.github.com/repos/kaazing/metrics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaazing/metrics/merges","archive_url":"https://api.github.com/repos/kaazing/metrics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaazing/metrics/downloads","issues_url":"https://api.github.com/repos/kaazing/metrics/issues{/number}","pulls_url":"https://api.github.com/repos/kaazing/metrics/pulls{/number}","milestones_url":"https://api.github.com/repos/kaazing/metrics/milestones{/number}","notifications_url":"https://api.github.com/repos/kaazing/metrics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaazing/metrics/labels{/name}","releases_url":"https://api.github.com/repos/kaazing/metrics/releases{/id}","created_at":"2015-05-21T19:43:38Z","updated_at":"2015-05-29T18:17:44Z","pushed_at":"2015-07-29T19:00:17Z","git_url":"git://github.com/kaazing/metrics.git","ssh_url":"git@github.com:kaazing/metrics.git","clone_url":"https://github.com/kaazing/metrics.git","svn_url":"https://github.com/kaazing/metrics","homepage":"http://kaazing.org","size":308,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":1,"forks":5,"open_issues":1,"watchers":2,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/kaazing/metrics/pulls/7"},"html":{"href":"https://github.com/kaazing/metrics/pull/7"},"issue":{"href":"https://api.github.com/repos/kaazing/metrics/issues/7"},"comments":{"href":"https://api.github.com/repos/kaazing/metrics/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/kaazing/metrics/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/kaazing/metrics/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kaazing/metrics/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/kaazing/metrics/statuses/809af1c82c8c49447ee0ceb9b05c1a89df6b9660"}}}}