{"action":"opened","number":73,"pull_request":{"url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/pulls/73","id":107303407,"html_url":"https://github.com/Microsoft/ApplicationInsights-dotnet-logging/pull/73","diff_url":"https://github.com/Microsoft/ApplicationInsights-dotnet-logging/pull/73.diff","patch_url":"https://github.com/Microsoft/ApplicationInsights-dotnet-logging/pull/73.patch","issue_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/issues/73","number":73,"state":"open","locked":false,"title":"Fix unit tests failure due to racing condition","user":{"login":"xiaomi7732","id":3674549,"avatar_url":"https://avatars.githubusercontent.com/u/3674549?v=3","gravatar_id":"","url":"https://api.github.com/users/xiaomi7732","html_url":"https://github.com/xiaomi7732","followers_url":"https://api.github.com/users/xiaomi7732/followers","following_url":"https://api.github.com/users/xiaomi7732/following{/other_user}","gists_url":"https://api.github.com/users/xiaomi7732/gists{/gist_id}","starred_url":"https://api.github.com/users/xiaomi7732/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiaomi7732/subscriptions","organizations_url":"https://api.github.com/users/xiaomi7732/orgs","repos_url":"https://api.github.com/users/xiaomi7732/repos","events_url":"https://api.github.com/users/xiaomi7732/events{/privacy}","received_events_url":"https://api.github.com/users/xiaomi7732/received_events","type":"User","site_admin":false},"body":"The tests passed on the local debugging session but failed during\r\nrunning. There are 2 issues contribute to the failure on the sever.\r\n\r\n1. Initialize() will return slightly earlier than\r\ntraceEventSession.Process() is fully running. Which leads to the event\r\nlost for the unit test because the unit test invokes the event\r\nimmediately after calling the initilize() on the module.\r\nAlthough the right fix would be locking on initilize() until Process()\r\nis fully up, it is an overhead to implement. At the same time, in real\r\nworld scenario, events are emitted in different process and will be\r\ncapatured once Process() is up.\r\nSo, I am fixing the issue by simple put a delay in the unit test after\r\ncalling initialize().\r\n\r\n2. When using F5 (Debug) to invoke unit tests and break the test case in\r\nthe middle, the trace event session will be left. That's why after\r\nDebug, the unit tests start to pass because there are existing opening\r\nsessions writing the events into the channel. This introduces huge\r\ninconsistence for the unit test result.\r\nI added clean up logic for the tests to solve this issue.","created_at":"2017-02-21T23:34:00Z","updated_at":"2017-02-21T23:34:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/pulls/73/commits","review_comments_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/pulls/73/comments","review_comment_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/issues/73/comments","statuses_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/statuses/f62fafe2117509e4f7ed083ec30076af53ef0060","head":{"label":"xiaomi7732:saars-ms/etw-fix-unit-tests","ref":"saars-ms/etw-fix-unit-tests","sha":"f62fafe2117509e4f7ed083ec30076af53ef0060","user":{"login":"xiaomi7732","id":3674549,"avatar_url":"https://avatars.githubusercontent.com/u/3674549?v=3","gravatar_id":"","url":"https://api.github.com/users/xiaomi7732","html_url":"https://github.com/xiaomi7732","followers_url":"https://api.github.com/users/xiaomi7732/followers","following_url":"https://api.github.com/users/xiaomi7732/following{/other_user}","gists_url":"https://api.github.com/users/xiaomi7732/gists{/gist_id}","starred_url":"https://api.github.com/users/xiaomi7732/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiaomi7732/subscriptions","organizations_url":"https://api.github.com/users/xiaomi7732/orgs","repos_url":"https://api.github.com/users/xiaomi7732/repos","events_url":"https://api.github.com/users/xiaomi7732/events{/privacy}","received_events_url":"https://api.github.com/users/xiaomi7732/received_events","type":"User","site_admin":false},"repo":{"id":81764918,"name":"ApplicationInsights-dotnet-logging","full_name":"xiaomi7732/ApplicationInsights-dotnet-logging","owner":{"login":"xiaomi7732","id":3674549,"avatar_url":"https://avatars.githubusercontent.com/u/3674549?v=3","gravatar_id":"","url":"https://api.github.com/users/xiaomi7732","html_url":"https://github.com/xiaomi7732","followers_url":"https://api.github.com/users/xiaomi7732/followers","following_url":"https://api.github.com/users/xiaomi7732/following{/other_user}","gists_url":"https://api.github.com/users/xiaomi7732/gists{/gist_id}","starred_url":"https://api.github.com/users/xiaomi7732/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiaomi7732/subscriptions","organizations_url":"https://api.github.com/users/xiaomi7732/orgs","repos_url":"https://api.github.com/users/xiaomi7732/repos","events_url":"https://api.github.com/users/xiaomi7732/events{/privacy}","received_events_url":"https://api.github.com/users/xiaomi7732/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xiaomi7732/ApplicationInsights-dotnet-logging","description":".NET Logging adaptors","fork":true,"url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging","forks_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/forks","keys_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/teams","hooks_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/hooks","issue_events_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/issues/events{/number}","events_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/events","assignees_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/assignees{/user}","branches_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/branches{/branch}","tags_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/tags","blobs_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/git/refs{/sha}","trees_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/statuses/{sha}","languages_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/languages","stargazers_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/stargazers","contributors_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/contributors","subscribers_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/subscribers","subscription_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/subscription","commits_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/commits{/sha}","git_commits_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/git/commits{/sha}","comments_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/comments{/number}","issue_comment_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/issues/comments{/number}","contents_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/contents/{+path}","compare_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/merges","archive_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/downloads","issues_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/issues{/number}","pulls_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/pulls{/number}","milestones_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/milestones{/number}","notifications_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/labels{/name}","releases_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/releases{/id}","deployments_url":"https://api.github.com/repos/xiaomi7732/ApplicationInsights-dotnet-logging/deployments","created_at":"2017-02-12T23:11:08Z","updated_at":"2017-02-12T23:11:09Z","pushed_at":"2017-02-21T23:32:44Z","git_url":"git://github.com/xiaomi7732/ApplicationInsights-dotnet-logging.git","ssh_url":"git@github.com:xiaomi7732/ApplicationInsights-dotnet-logging.git","clone_url":"https://github.com/xiaomi7732/ApplicationInsights-dotnet-logging.git","svn_url":"https://github.com/xiaomi7732/ApplicationInsights-dotnet-logging","homepage":null,"size":1250,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"Microsoft:develop","ref":"develop","sha":"b07b726606ff610363ef4fe65a60e16f9b541eac","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":46078405,"name":"ApplicationInsights-dotnet-logging","full_name":"Microsoft/ApplicationInsights-dotnet-logging","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/ApplicationInsights-dotnet-logging","description":".NET Logging adaptors","fork":false,"url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging","forks_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/forks","keys_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/teams","hooks_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/events","assignees_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/tags","blobs_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/languages","stargazers_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/subscription","commits_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/merges","archive_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/downloads","issues_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/deployments","created_at":"2015-11-12T20:18:47Z","updated_at":"2017-02-21T21:48:52Z","pushed_at":"2017-02-21T21:43:53Z","git_url":"git://github.com/Microsoft/ApplicationInsights-dotnet-logging.git","ssh_url":"git@github.com:Microsoft/ApplicationInsights-dotnet-logging.git","clone_url":"https://github.com/Microsoft/ApplicationInsights-dotnet-logging.git","svn_url":"https://github.com/Microsoft/ApplicationInsights-dotnet-logging","homepage":null,"size":1251,"stargazers_count":25,"watchers_count":25,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":8,"forks":12,"open_issues":8,"watchers":25,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/pulls/73"},"html":{"href":"https://github.com/Microsoft/ApplicationInsights-dotnet-logging/pull/73"},"issue":{"href":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/issues/73"},"comments":{"href":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/issues/73/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/pulls/73/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/pulls/73/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-logging/statuses/f62fafe2117509e4f7ed083ec30076af53ef0060"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":19,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"xiaomi7732"}}