{"action":"created","comment":{"url":"https://api.github.com/repos/DrPandemic/MasDB/pulls/comments/110509791","pull_request_review_id":31693069,"id":110509791,"diff_hunk":"@@ -0,0 +1,23 @@\n+defmodule DataServerTest do\n+  use PowerAssert\n+  import Masdb.Data.Server\n+  alias Masdb.Register\n+  alias Masdb.Data\n+\n+  setup context do\n+    {:ok, register} = Register.Server.start_link(context.test)\n+    {:ok, data_server} = Masdb.Data.Server.start_link(\n+      context.test,\n+      String.to_atom(Atom.to_string(context.test) <> \" data_server\")\n+    )\n+    Register.Server.force_become_synced(register)\n+    [register: register, data_server: data_server]\n+  end\n+\n+  test \"insert waits for the register to be synced\", context do\n+    {:ok, register} = Register.Server.start_link(:foo)\n+    {:ok, data_server} = start_link(:foo, :bar)\n+\n+    assert insert(\"foo\", [], data_server) == :not_synced\n+  end","path":"test/data_server_test.exs","position":22,"original_position":22,"commit_id":"8fd0fda7b8357ca3e8da400ca92e8afe1cba5c0d","original_commit_id":"8fd0fda7b8357ca3e8da400ca92e8afe1cba5c0d","user":{"login":"samdus","id":8702138,"avatar_url":"https://avatars2.githubusercontent.com/u/8702138?v=3","gravatar_id":"","url":"https://api.github.com/users/samdus","html_url":"https://github.com/samdus","followers_url":"https://api.github.com/users/samdus/followers","following_url":"https://api.github.com/users/samdus/following{/other_user}","gists_url":"https://api.github.com/users/samdus/gists{/gist_id}","starred_url":"https://api.github.com/users/samdus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samdus/subscriptions","organizations_url":"https://api.github.com/users/samdus/orgs","repos_url":"https://api.github.com/users/samdus/repos","events_url":"https://api.github.com/users/samdus/events{/privacy}","received_events_url":"https://api.github.com/users/samdus/received_events","type":"User","site_admin":false},"body":"I really hate the fact that we cannot test our Server functions... I wish we had time for this...","created_at":"2017-04-08T04:13:18Z","updated_at":"2017-04-08T04:16:45Z","html_url":"https://github.com/DrPandemic/MasDB/pull/35#discussion_r110509791","pull_request_url":"https://api.github.com/repos/DrPandemic/MasDB/pulls/35","_links":{"self":{"href":"https://api.github.com/repos/DrPandemic/MasDB/pulls/comments/110509791"},"html":{"href":"https://github.com/DrPandemic/MasDB/pull/35#discussion_r110509791"},"pull_request":{"href":"https://api.github.com/repos/DrPandemic/MasDB/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/DrPandemic/MasDB/pulls/35","id":114869918,"html_url":"https://github.com/DrPandemic/MasDB/pull/35","diff_url":"https://github.com/DrPandemic/MasDB/pull/35.diff","patch_url":"https://github.com/DrPandemic/MasDB/pull/35.patch","issue_url":"https://api.github.com/repos/DrPandemic/MasDB/issues/35","number":35,"state":"open","locked":false,"title":"Datastore server","user":{"login":"DrPandemic","id":3250155,"avatar_url":"https://avatars0.githubusercontent.com/u/3250155?v=3","gravatar_id":"","url":"https://api.github.com/users/DrPandemic","html_url":"https://github.com/DrPandemic","followers_url":"https://api.github.com/users/DrPandemic/followers","following_url":"https://api.github.com/users/DrPandemic/following{/other_user}","gists_url":"https://api.github.com/users/DrPandemic/gists{/gist_id}","starred_url":"https://api.github.com/users/DrPandemic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DrPandemic/subscriptions","organizations_url":"https://api.github.com/users/DrPandemic/orgs","repos_url":"https://api.github.com/users/DrPandemic/repos","events_url":"https://api.github.com/users/DrPandemic/events{/privacy}","received_events_url":"https://api.github.com/users/DrPandemic/received_events","type":"User","site_admin":false},"body":"Adds the basic Genserver keeping the state.\r\n\r\nInteresting syntax I found : with (http://learningelixir.joekain.com/learning-elixir-with/). This kinda replace the Pipe library. It's more verbose, but it has the advantage that every function can have a different return form.","created_at":"2017-04-07T18:06:17Z","updated_at":"2017-04-08T04:16:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44d52e4773b7bc21409347a784295fb951f361fd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/DrPandemic/MasDB/pulls/35/commits","review_comments_url":"https://api.github.com/repos/DrPandemic/MasDB/pulls/35/comments","review_comment_url":"https://api.github.com/repos/DrPandemic/MasDB/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DrPandemic/MasDB/issues/35/comments","statuses_url":"https://api.github.com/repos/DrPandemic/MasDB/statuses/8fd0fda7b8357ca3e8da400ca92e8afe1cba5c0d","head":{"label":"DrPandemic:datastore-server","ref":"datastore-server","sha":"8fd0fda7b8357ca3e8da400ca92e8afe1cba5c0d","user":{"login":"DrPandemic","id":3250155,"avatar_url":"https://avatars0.githubusercontent.com/u/3250155?v=3","gravatar_id":"","url":"https://api.github.com/users/DrPandemic","html_url":"https://github.com/DrPandemic","followers_url":"https://api.github.com/users/DrPandemic/followers","following_url":"https://api.github.com/users/DrPandemic/following{/other_user}","gists_url":"https://api.github.com/users/DrPandemic/gists{/gist_id}","starred_url":"https://api.github.com/users/DrPandemic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DrPandemic/subscriptions","organizations_url":"https://api.github.com/users/DrPandemic/orgs","repos_url":"https://api.github.com/users/DrPandemic/repos","events_url":"https://api.github.com/users/DrPandemic/events{/privacy}","received_events_url":"https://api.github.com/users/DrPandemic/received_events","type":"User","site_admin":false},"repo":{"id":79395364,"name":"MasDB","full_name":"DrPandemic/MasDB","owner":{"login":"DrPandemic","id":3250155,"avatar_url":"https://avatars0.githubusercontent.com/u/3250155?v=3","gravatar_id":"","url":"https://api.github.com/users/DrPandemic","html_url":"https://github.com/DrPandemic","followers_url":"https://api.github.com/users/DrPandemic/followers","following_url":"https://api.github.com/users/DrPandemic/following{/other_user}","gists_url":"https://api.github.com/users/DrPandemic/gists{/gist_id}","starred_url":"https://api.github.com/users/DrPandemic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DrPandemic/subscriptions","organizations_url":"https://api.github.com/users/DrPandemic/orgs","repos_url":"https://api.github.com/users/DrPandemic/repos","events_url":"https://api.github.com/users/DrPandemic/events{/privacy}","received_events_url":"https://api.github.com/users/DrPandemic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DrPandemic/MasDB","description":null,"fork":false,"url":"https://api.github.com/repos/DrPandemic/MasDB","forks_url":"https://api.github.com/repos/DrPandemic/MasDB/forks","keys_url":"https://api.github.com/repos/DrPandemic/MasDB/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DrPandemic/MasDB/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DrPandemic/MasDB/teams","hooks_url":"https://api.github.com/repos/DrPandemic/MasDB/hooks","issue_events_url":"https://api.github.com/repos/DrPandemic/MasDB/issues/events{/number}","events_url":"https://api.github.com/repos/DrPandemic/MasDB/events","assignees_url":"https://api.github.com/repos/DrPandemic/MasDB/assignees{/user}","branches_url":"https://api.github.com/repos/DrPandemic/MasDB/branches{/branch}","tags_url":"https://api.github.com/repos/DrPandemic/MasDB/tags","blobs_url":"https://api.github.com/repos/DrPandemic/MasDB/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DrPandemic/MasDB/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DrPandemic/MasDB/git/refs{/sha}","trees_url":"https://api.github.com/repos/DrPandemic/MasDB/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DrPandemic/MasDB/statuses/{sha}","languages_url":"https://api.github.com/repos/DrPandemic/MasDB/languages","stargazers_url":"https://api.github.com/repos/DrPandemic/MasDB/stargazers","contributors_url":"https://api.github.com/repos/DrPandemic/MasDB/contributors","subscribers_url":"https://api.github.com/repos/DrPandemic/MasDB/subscribers","subscription_url":"https://api.github.com/repos/DrPandemic/MasDB/subscription","commits_url":"https://api.github.com/repos/DrPandemic/MasDB/commits{/sha}","git_commits_url":"https://api.github.com/repos/DrPandemic/MasDB/git/commits{/sha}","comments_url":"https://api.github.com/repos/DrPandemic/MasDB/comments{/number}","issue_comment_url":"https://api.github.com/repos/DrPandemic/MasDB/issues/comments{/number}","contents_url":"https://api.github.com/repos/DrPandemic/MasDB/contents/{+path}","compare_url":"https://api.github.com/repos/DrPandemic/MasDB/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DrPandemic/MasDB/merges","archive_url":"https://api.github.com/repos/DrPandemic/MasDB/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DrPandemic/MasDB/downloads","issues_url":"https://api.github.com/repos/DrPandemic/MasDB/issues{/number}","pulls_url":"https://api.github.com/repos/DrPandemic/MasDB/pulls{/number}","milestones_url":"https://api.github.com/repos/DrPandemic/MasDB/milestones{/number}","notifications_url":"https://api.github.com/repos/DrPandemic/MasDB/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DrPandemic/MasDB/labels{/name}","releases_url":"https://api.github.com/repos/DrPandemic/MasDB/releases{/id}","deployments_url":"https://api.github.com/repos/DrPandemic/MasDB/deployments","created_at":"2017-01-18T23:30:06Z","updated_at":"2017-01-27T23:04:46Z","pushed_at":"2017-04-07T18:06:18Z","git_url":"git://github.com/DrPandemic/MasDB.git","ssh_url":"git@github.com:DrPandemic/MasDB.git","clone_url":"https://github.com/DrPandemic/MasDB.git","svn_url":"https://github.com/DrPandemic/MasDB","homepage":null,"size":51,"stargazers_count":1,"watchers_count":1,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"base":{"label":"DrPandemic:master","ref":"master","sha":"ba8601a3eaa18c253713ab6f0fdce1b6fa225d41","user":{"login":"DrPandemic","id":3250155,"avatar_url":"https://avatars0.githubusercontent.com/u/3250155?v=3","gravatar_id":"","url":"https://api.github.com/users/DrPandemic","html_url":"https://github.com/DrPandemic","followers_url":"https://api.github.com/users/DrPandemic/followers","following_url":"https://api.github.com/users/DrPandemic/following{/other_user}","gists_url":"https://api.github.com/users/DrPandemic/gists{/gist_id}","starred_url":"https://api.github.com/users/DrPandemic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DrPandemic/subscriptions","organizations_url":"https://api.github.com/users/DrPandemic/orgs","repos_url":"https://api.github.com/users/DrPandemic/repos","events_url":"https://api.github.com/users/DrPandemic/events{/privacy}","received_events_url":"https://api.github.com/users/DrPandemic/received_events","type":"User","site_admin":false},"repo":{"id":79395364,"name":"MasDB","full_name":"DrPandemic/MasDB","owner":{"login":"DrPandemic","id":3250155,"avatar_url":"https://avatars0.githubusercontent.com/u/3250155?v=3","gravatar_id":"","url":"https://api.github.com/users/DrPandemic","html_url":"https://github.com/DrPandemic","followers_url":"https://api.github.com/users/DrPandemic/followers","following_url":"https://api.github.com/users/DrPandemic/following{/other_user}","gists_url":"https://api.github.com/users/DrPandemic/gists{/gist_id}","starred_url":"https://api.github.com/users/DrPandemic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DrPandemic/subscriptions","organizations_url":"https://api.github.com/users/DrPandemic/orgs","repos_url":"https://api.github.com/users/DrPandemic/repos","events_url":"https://api.github.com/users/DrPandemic/events{/privacy}","received_events_url":"https://api.github.com/users/DrPandemic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DrPandemic/MasDB","description":null,"fork":false,"url":"https://api.github.com/repos/DrPandemic/MasDB","forks_url":"https://api.github.com/repos/DrPandemic/MasDB/forks","keys_url":"https://api.github.com/repos/DrPandemic/MasDB/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DrPandemic/MasDB/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DrPandemic/MasDB/teams","hooks_url":"https://api.github.com/repos/DrPandemic/MasDB/hooks","issue_events_url":"https://api.github.com/repos/DrPandemic/MasDB/issues/events{/number}","events_url":"https://api.github.com/repos/DrPandemic/MasDB/events","assignees_url":"https://api.github.com/repos/DrPandemic/MasDB/assignees{/user}","branches_url":"https://api.github.com/repos/DrPandemic/MasDB/branches{/branch}","tags_url":"https://api.github.com/repos/DrPandemic/MasDB/tags","blobs_url":"https://api.github.com/repos/DrPandemic/MasDB/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DrPandemic/MasDB/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DrPandemic/MasDB/git/refs{/sha}","trees_url":"https://api.github.com/repos/DrPandemic/MasDB/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DrPandemic/MasDB/statuses/{sha}","languages_url":"https://api.github.com/repos/DrPandemic/MasDB/languages","stargazers_url":"https://api.github.com/repos/DrPandemic/MasDB/stargazers","contributors_url":"https://api.github.com/repos/DrPandemic/MasDB/contributors","subscribers_url":"https://api.github.com/repos/DrPandemic/MasDB/subscribers","subscription_url":"https://api.github.com/repos/DrPandemic/MasDB/subscription","commits_url":"https://api.github.com/repos/DrPandemic/MasDB/commits{/sha}","git_commits_url":"https://api.github.com/repos/DrPandemic/MasDB/git/commits{/sha}","comments_url":"https://api.github.com/repos/DrPandemic/MasDB/comments{/number}","issue_comment_url":"https://api.github.com/repos/DrPandemic/MasDB/issues/comments{/number}","contents_url":"https://api.github.com/repos/DrPandemic/MasDB/contents/{+path}","compare_url":"https://api.github.com/repos/DrPandemic/MasDB/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DrPandemic/MasDB/merges","archive_url":"https://api.github.com/repos/DrPandemic/MasDB/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DrPandemic/MasDB/downloads","issues_url":"https://api.github.com/repos/DrPandemic/MasDB/issues{/number}","pulls_url":"https://api.github.com/repos/DrPandemic/MasDB/pulls{/number}","milestones_url":"https://api.github.com/repos/DrPandemic/MasDB/milestones{/number}","notifications_url":"https://api.github.com/repos/DrPandemic/MasDB/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DrPandemic/MasDB/labels{/name}","releases_url":"https://api.github.com/repos/DrPandemic/MasDB/releases{/id}","deployments_url":"https://api.github.com/repos/DrPandemic/MasDB/deployments","created_at":"2017-01-18T23:30:06Z","updated_at":"2017-01-27T23:04:46Z","pushed_at":"2017-04-07T18:06:18Z","git_url":"git://github.com/DrPandemic/MasDB.git","ssh_url":"git@github.com:DrPandemic/MasDB.git","clone_url":"https://github.com/DrPandemic/MasDB.git","svn_url":"https://github.com/DrPandemic/MasDB","homepage":null,"size":51,"stargazers_count":1,"watchers_count":1,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DrPandemic/MasDB/pulls/35"},"html":{"href":"https://github.com/DrPandemic/MasDB/pull/35"},"issue":{"href":"https://api.github.com/repos/DrPandemic/MasDB/issues/35"},"comments":{"href":"https://api.github.com/repos/DrPandemic/MasDB/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/DrPandemic/MasDB/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/DrPandemic/MasDB/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DrPandemic/MasDB/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/DrPandemic/MasDB/statuses/8fd0fda7b8357ca3e8da400ca92e8afe1cba5c0d"}}}}
{"actor":{"display_login":"samdus"}}