GitHub PullRequestReviewCommentEvent at 2014-02-28 19:50:15
Repository: riak_core
Actor: jrwest
Payload: {"comment":{"url":"https://api.github.com/repos/basho/riak_core/pulls/comments/10178505","id":10178505,"diff_hunk":"@@ -65,35 +65,199 @@ bg_mgr_test_() ->\n                          Period = 5000000,\n                          ?BG_MGR:set_token_rate(T, {Period, Max}),\n                          ?assertEqual(ok, ?BG_MGR:get_token(T)),\n+                         Locker = spawn(fun() -> receive _ -> ok end end),\n+                         Locker2 = spawn(fun() -> receive _ -> ok end end),\n+                         ?assertMatch({ok, _}, ?BG_MGR:get_lock(lock_a, Locker)),\n+                         ?assertMatch({ok, _}, ?BG_MGR:get_lock(lock_a, Locker2)),\n                          ?assertEqual(1, length(?BG_MGR:all_tokens(T))),\n-                         crash_and_restart_token_manager(),\n+                         kill_bg_mgr(),\n+                         Locker2 ! ok,\n+                         timer:sleep(100),\n+                         start_bg_mgr(),\n+                         %crash_and_restart_token_manager(),\n                          ?assertEqual(ok, ?BG_MGR:get_token(T)),\n                          ?assertEqual(2, length(?BG_MGR:all_tokens(T))),\n-                         ?assertEqual(max_concurrency, ?BG_MGR:get_token(T))\n+                         ?assertEqual(max_concurrency, ?BG_MGR:get_token(T)),\n+                         ?assertEqual(1, length(?BG_MGR:all_locks(lock_a))),\n+                        Locker ! ok\n                  end},\n \n-                {\"bypass API\",\n-                 fun() ->\n-                         %% bypass API\n-                         riak_core_bg_manager:bypass(true),\n+                {\"lock api\", [","path":"test/bg_manager_tests.erl","position":27,"original_position":27,"commit_id":"4e5a3b40ba32c9236a81b749a042ef9193d6d600","original_commit_id":"4e5a3b40ba32c9236a81b749a042ef9193d6d600","user":{"login":"jrwest","id":167790,"avatar_url":"https://avatars.githubusercontent.com/u/167790","gravatar_id":"98c57a5208aac0c0fdee1c531bb18d69","url":"https://api.github.com/users/jrwest","html_url":"https://github.com/jrwest","followers_url":"https://api.github.com/users/jrwest/followers","following_url":"https://api.github.com/users/jrwest/following{/other_user}","gists_url":"https://api.github.com/users/jrwest/gists{/gist_id}","starred_url":"https://api.github.com/users/jrwest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrwest/subscriptions","organizations_url":"https://api.github.com/users/jrwest/orgs","repos_url":"https://api.github.com/users/jrwest/repos","events_url":"https://api.github.com/users/jrwest/events{/privacy}","received_events_url":"https://api.github.com/users/jrwest/received_events","type":"User","site_admin":false},"body":"i dont think we should be adding to these tests. I'm not even sure why they are still here. Can this be extended to the eqc test?","created_at":"2014-02-28T19:50:15Z","updated_at":"2014-02-28T19:50:15Z","html_url":"https://github.com/basho/riak_core/pull/538#discussion_r10178505","pull_request_url":"https://api.github.com/repos/basho/riak_core/pulls/538","_links":{"self":{"href":"https://api.github.com/repos/basho/riak_core/pulls/comments/10178505"},"html":{"href":"https://github.com/basho/riak_core/pull/538#discussion_r10178505"},"pull_request":{"href":"https://api.github.com/repos/basho/riak_core/pulls/538"}}}}