{"action":"created","issue":{"url":"https://api.github.com/repos/ardanlabs/kit/issues/11","repository_url":"https://api.github.com/repos/ardanlabs/kit","labels_url":"https://api.github.com/repos/ardanlabs/kit/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/ardanlabs/kit/issues/11/comments","events_url":"https://api.github.com/repos/ardanlabs/kit/issues/11/events","html_url":"https://github.com/ardanlabs/kit/issues/11","id":135083745,"number":11,"title":"Occasional race condition with tests subpackage","user":{"login":"influx6","id":131629,"avatar_url":"https://avatars.githubusercontent.com/u/131629?v=3","gravatar_id":"","url":"https://api.github.com/users/influx6","html_url":"https://github.com/influx6","followers_url":"https://api.github.com/users/influx6/followers","following_url":"https://api.github.com/users/influx6/following{/other_user}","gists_url":"https://api.github.com/users/influx6/gists{/gist_id}","starred_url":"https://api.github.com/users/influx6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influx6/subscriptions","organizations_url":"https://api.github.com/users/influx6/orgs","repos_url":"https://api.github.com/users/influx6/repos","events_url":"https://api.github.com/users/influx6/events{/privacy}","received_events_url":"https://api.github.com/users/influx6/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-20T14:56:06Z","updated_at":"2016-02-22T15:05:40Z","closed_at":"2016-02-22T15:05:40Z","body":"I have noticed a number of times in use of the Kit tests subpackage that there exists a race when using tests.ResetLog() and tests.DisplayLog(), especially when parrallel tests are allowed, we need to wrap those calls with mutex to avoid such a case."},"comment":{"url":"https://api.github.com/repos/ardanlabs/kit/issues/comments/187221738","html_url":"https://github.com/ardanlabs/kit/issues/11#issuecomment-187221738","issue_url":"https://api.github.com/repos/ardanlabs/kit/issues/11","id":187221738,"user":{"login":"ardan-bkennedy","id":2280005,"avatar_url":"https://avatars.githubusercontent.com/u/2280005?v=3","gravatar_id":"","url":"https://api.github.com/users/ardan-bkennedy","html_url":"https://github.com/ardan-bkennedy","followers_url":"https://api.github.com/users/ardan-bkennedy/followers","following_url":"https://api.github.com/users/ardan-bkennedy/following{/other_user}","gists_url":"https://api.github.com/users/ardan-bkennedy/gists{/gist_id}","starred_url":"https://api.github.com/users/ardan-bkennedy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ardan-bkennedy/subscriptions","organizations_url":"https://api.github.com/users/ardan-bkennedy/orgs","repos_url":"https://api.github.com/users/ardan-bkennedy/repos","events_url":"https://api.github.com/users/ardan-bkennedy/events{/privacy}","received_events_url":"https://api.github.com/users/ardan-bkennedy/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T15:05:39Z","updated_at":"2016-02-22T15:05:39Z","body":"This will not solve the problem you wish to solve. The log package acts as a singleton and this code supports that assumption per package. If you want to run test functions in parallel inside a package, you will need a TestMain and call these functions once."}}