{"action":"closed","issue":{"url":"https://api.github.com/repos/henri-tremblay/mytest/issues/119","labels_url":"https://api.github.com/repos/henri-tremblay/mytest/issues/119/labels{/name}","comments_url":"https://api.github.com/repos/henri-tremblay/mytest/issues/119/comments","events_url":"https://api.github.com/repos/henri-tremblay/mytest/issues/119/events","html_url":"https://github.com/henri-tremblay/mytest/issues/119","id":82989699,"number":119,"title":"Mock assertion counting does not seem to be thread safe","user":{"login":"henri-tremblay","id":1216819,"avatar_url":"https://avatars.githubusercontent.com/u/1216819?v=3","gravatar_id":"","url":"https://api.github.com/users/henri-tremblay","html_url":"https://github.com/henri-tremblay","followers_url":"https://api.github.com/users/henri-tremblay/followers","following_url":"https://api.github.com/users/henri-tremblay/following{/other_user}","gists_url":"https://api.github.com/users/henri-tremblay/gists{/gist_id}","starred_url":"https://api.github.com/users/henri-tremblay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henri-tremblay/subscriptions","organizations_url":"https://api.github.com/users/henri-tremblay/orgs","repos_url":"https://api.github.com/users/henri-tremblay/repos","events_url":"https://api.github.com/users/henri-tremblay/events{/privacy}","received_events_url":"https://api.github.com/users/henri-tremblay/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/henri-tremblay/mytest/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/henri-tremblay/mytest/labels/core","name":"core","color":"f7c6c7"},{"url":"https://api.github.com/repos/henri-tremblay/mytest/labels/fixed","name":"fixed","color":"c7def8"},{"url":"https://api.github.com/repos/henri-tremblay/mytest/labels/major","name":"major","color":"f7c6c7"}],"state":"closed","locked":false,"assignee":{"login":"henri-tremblay","id":1216819,"avatar_url":"https://avatars.githubusercontent.com/u/1216819?v=3","gravatar_id":"","url":"https://api.github.com/users/henri-tremblay","html_url":"https://github.com/henri-tremblay","followers_url":"https://api.github.com/users/henri-tremblay/followers","following_url":"https://api.github.com/users/henri-tremblay/following{/other_user}","gists_url":"https://api.github.com/users/henri-tremblay/gists{/gist_id}","starred_url":"https://api.github.com/users/henri-tremblay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henri-tremblay/subscriptions","organizations_url":"https://api.github.com/users/henri-tremblay/orgs","repos_url":"https://api.github.com/users/henri-tremblay/repos","events_url":"https://api.github.com/users/henri-tremblay/events{/privacy}","received_events_url":"https://api.github.com/users/henri-tremblay/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/henri-tremblay/mytest/milestones/1","html_url":"https://github.com/henri-tremblay/mytest/milestones/2.4","labels_url":"https://api.github.com/repos/henri-tremblay/mytest/milestones/1/labels","id":1139050,"number":1,"title":"2.4","description":"EasyMock 2.4","creator":{"login":"henri-tremblay","id":1216819,"avatar_url":"https://avatars.githubusercontent.com/u/1216819?v=3","gravatar_id":"","url":"https://api.github.com/users/henri-tremblay","html_url":"https://github.com/henri-tremblay","followers_url":"https://api.github.com/users/henri-tremblay/followers","following_url":"https://api.github.com/users/henri-tremblay/following{/other_user}","gists_url":"https://api.github.com/users/henri-tremblay/gists{/gist_id}","starred_url":"https://api.github.com/users/henri-tremblay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henri-tremblay/subscriptions","organizations_url":"https://api.github.com/users/henri-tremblay/orgs","repos_url":"https://api.github.com/users/henri-tremblay/repos","events_url":"https://api.github.com/users/henri-tremblay/events{/privacy}","received_events_url":"https://api.github.com/users/henri-tremblay/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":27,"state":"closed","created_at":"2015-05-29T01:57:42Z","updated_at":"2015-05-31T03:52:56Z","due_on":"2008-07-02T04:00:00Z","closed_at":"2015-05-29T01:57:42Z"},"comments":0,"created_at":"2015-05-31T03:52:55Z","updated_at":"2015-05-31T03:52:55Z","closed_at":"2015-05-31T03:52:55Z","body":"*Migrated from:* CodeHaus issue EASYMOCK-7\n*Original reporter:* Henri Tremblay\n\n---------------------------------------------------------\nHi,\nI had a test in which a single mock object was called back by various different threads concurrently and it randomly failed to count the calls to each method, leading to unexpected test failures.\n\nI then modified the test so that each thread had its own mock object to hit and I got back repeatable successes.\nThe drawback is, my test got quite a bit more complex.\n\nWould it be possible to make mock objects thread safe, or to have the ability to create a synchronized wrapper for them, something like EasyMock.synchronizedMock(mock), mimicking what Collections.synchronizedXXX(collection) methods do?\n"}}