{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Entropy/pulls/comments/46497553","id":46497553,"diff_hunk":"@@ -0,0 +1,138 @@\n+﻿using System.Net;\n+using System.Threading.Tasks;\n+using Microsoft.AspNet.Server.Testing;\n+using Microsoft.AspNet.Testing.xunit;\n+using Xunit;\n+\n+namespace ServerTests.Diagnostics\n+{\n+    public class DiagnosticsStatusCodesMvcTests\n+    {\n+        private const string SiteName = \"Diagnostics.StatusCodes.Mvc\";\n+\n+        [ConditionalTheory]\n+        [OSSkipCondition(OperatingSystems.Linux)]\n+        [OSSkipCondition(OperatingSystems.MacOSX)]\n+        [InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x86, \"http://localhost:6100\")]\n+        [InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x64, \"http://localhost:6101\")]\n+        [InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, \"http://localhost:6102\")]\n+        [InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, \"http://localhost:6103\")]\n+\n+        public async Task ExistingPage_WebListener(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl)\n+        {\n+            await ExistingPage(ServerType.WebListener, runtimeFlavor, architecture, applicationBaseUrl);\n+        }\n+\n+        [ConditionalTheory]\n+        [InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x64, \"http://localhost:6104\")]\n+        [InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, \"http://localhost:6105\")]\n+\n+        public async Task ExistingPage_Kestrel(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl)\n+        {\n+            await ExistingPage(ServerType.Kestrel, runtimeFlavor, architecture, applicationBaseUrl);\n+        }\n+\n+        private async Task ExistingPage(ServerType server, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl)\n+        {\n+            await ServerHelper.ServerResponseMessageTest(\n+                SiteName,\n+                server,\n+                runtimeFlavor,\n+                architecture,\n+                applicationBaseUrl,\n+                async (httpClient, logger, token) =>\n+                {\n+                    var response = await RetryHelper.RetryRequest(async () =>\n+                    {\n+                        return await httpClient.GetAsync(string.Empty);\n+                    }, logger, token);\n+\n+                    var responseText = await response.Content.ReadAsStringAsync();\n+                    string expectedText = \"Hello World, try /bob to get a 404\";\n+                    Assert.Equal(expectedText, responseText);\n+\n+                    Assert.Equal(HttpStatusCode.OK, response.StatusCode);\n+                });\n+        }\n+\n+        [ConditionalTheory]\n+        [OSSkipCondition(OperatingSystems.Linux)]\n+        [OSSkipCondition(OperatingSystems.MacOSX)]\n+        [InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x86, \"http://localhost:6106\")]\n+        [InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x64, \"http://localhost:6107\")]\n+        [InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, \"http://localhost:6108\")]\n+        [InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, \"http://localhost:6109\")]\n+        public async Task NonExistingPage_WebListener(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl)\n+        {\n+            await NonExistingPage(ServerType.WebListener, runtimeFlavor, architecture, applicationBaseUrl);\n+        }\n+\n+        [ConditionalTheory]\n+        [InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x64, \"http://localhost:6110\")]\n+        [InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, \"http://localhost:6111\")]\n+        public async Task NonExistingPage_Kestrel(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl)\n+        {\n+            await NonExistingPage(ServerType.Kestrel, runtimeFlavor, architecture, applicationBaseUrl);\n+        }\n+\n+        private async Task NonExistingPage(ServerType server, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl)\n+        {\n+            await ServerHelper.ServerResponseMessageTest(\n+                SiteName,\n+                server,\n+                runtimeFlavor,\n+                architecture,\n+                applicationBaseUrl,\n+                async (httpClient, logger, token) =>\n+                {\n+                    var response = await RetryHelper.RetryRequest(async () =>\n+                    {\n+                        return await httpClient.GetAsync(\"/bob\");\n+                    }, logger, token);\n+\n+                    var responseText = await response.Content.ReadAsStringAsync();\n+                    Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);\n+                });\n+        }\n+\n+        [ConditionalTheory]\n+        [OSSkipCondition(OperatingSystems.Linux)]\n+        [OSSkipCondition(OperatingSystems.MacOSX)]\n+        [InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x86, \"http://localhost:6112\")]\n+        [InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x64, \"http://localhost:6113\")]\n+        [InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, \"http://localhost:6114\")]\n+        [InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, \"http://localhost:6115\")]\n+        public async Task CustomErrorCode_WebListener(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl)\n+        {\n+            await CustomErrorCode(ServerType.WebListener, runtimeFlavor, architecture, applicationBaseUrl);\n+        }\n+\n+        [ConditionalTheory]\n+        [InlineData(RuntimeFlavor.Clr, RuntimeArchitecture.x64, \"http://localhost:6116\")]\n+        [InlineData(RuntimeFlavor.CoreClr, RuntimeArchitecture.x64, \"http://localhost:6117\")]\n+        public async Task CustomErrorCode_Kestrel(RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl)\n+        {\n+            await CustomErrorCode(ServerType.Kestrel, runtimeFlavor, architecture, applicationBaseUrl);\n+        }\n+\n+        public async Task CustomErrorCode(ServerType server, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl)\n+        {\n+            await ServerHelper.ServerResponseMessageTest(\n+                SiteName,\n+                server,\n+                runtimeFlavor,\n+                architecture,\n+                applicationBaseUrl,\n+                async (httpClient, logger, token) =>\n+                {\n+                    var response = await RetryHelper.RetryRequest(async () =>\n+                    {\n+                        return await httpClient.GetAsync(\"/errors/\" + (int)HttpStatusCode.PaymentRequired);\n+                    }, logger, token);\n+\n+                    var responseText = await response.Content.ReadAsStringAsync();","path":"test/ServerTests/Diagnostics/DiagnosticsStatusCodesMvcTests.cs","position":133,"original_position":133,"commit_id":"b2f74a768162389dcfe707ef8c895431440ff9bc","original_commit_id":"e94eb588896cb8466d362f13895e88d502aa4fec","user":{"login":"Tratcher","id":1821173,"avatar_url":"https://avatars.githubusercontent.com/u/1821173?v=3","gravatar_id":"","url":"https://api.github.com/users/Tratcher","html_url":"https://github.com/Tratcher","followers_url":"https://api.github.com/users/Tratcher/followers","following_url":"https://api.github.com/users/Tratcher/following{/other_user}","gists_url":"https://api.github.com/users/Tratcher/gists{/gist_id}","starred_url":"https://api.github.com/users/Tratcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tratcher/subscriptions","organizations_url":"https://api.github.com/users/Tratcher/orgs","repos_url":"https://api.github.com/users/Tratcher/repos","events_url":"https://api.github.com/users/Tratcher/events{/privacy}","received_events_url":"https://api.github.com/users/Tratcher/received_events","type":"User","site_admin":false},"body":"Try/Catch&Log the response text if the Assert fails. Otherwise it's hard to debug tests on the CI. See https://github.com/aspnet/IISIntegration/blob/dev/test/Microsoft.AspNet.IISPlatformHandler.FunctionalTests/NtlmAuthentationTest.cs#L116-L121","created_at":"2015-12-03T00:20:15Z","updated_at":"2015-12-03T00:20:15Z","html_url":"https://github.com/aspnet/Entropy/pull/78#discussion_r46497553","pull_request_url":"https://api.github.com/repos/aspnet/Entropy/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Entropy/pulls/comments/46497553"},"html":{"href":"https://github.com/aspnet/Entropy/pull/78#discussion_r46497553"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Entropy/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/Entropy/pulls/78","id":52473333,"html_url":"https://github.com/aspnet/Entropy/pull/78","diff_url":"https://github.com/aspnet/Entropy/pull/78.diff","patch_url":"https://github.com/aspnet/Entropy/pull/78.patch","issue_url":"https://api.github.com/repos/aspnet/Entropy/issues/78","number":78,"state":"open","locked":false,"title":"Server tests for Entropy","user":{"login":"victorhurdugaci","id":5921642,"avatar_url":"https://avatars.githubusercontent.com/u/5921642?v=3","gravatar_id":"","url":"https://api.github.com/users/victorhurdugaci","html_url":"https://github.com/victorhurdugaci","followers_url":"https://api.github.com/users/victorhurdugaci/followers","following_url":"https://api.github.com/users/victorhurdugaci/following{/other_user}","gists_url":"https://api.github.com/users/victorhurdugaci/gists{/gist_id}","starred_url":"https://api.github.com/users/victorhurdugaci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victorhurdugaci/subscriptions","organizations_url":"https://api.github.com/users/victorhurdugaci/orgs","repos_url":"https://api.github.com/users/victorhurdugaci/repos","events_url":"https://api.github.com/users/victorhurdugaci/events{/privacy}","received_events_url":"https://api.github.com/users/victorhurdugaci/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/aspnet/Coherence-Signed/issues/113\r\n\r\nPlease review @Tratcher ","created_at":"2015-12-02T23:58:48Z","updated_at":"2015-12-03T00:20:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4fa27effd72161de1103b534c7ff51d047bf9a8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Entropy/pulls/78/commits","review_comments_url":"https://api.github.com/repos/aspnet/Entropy/pulls/78/comments","review_comment_url":"https://api.github.com/repos/aspnet/Entropy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Entropy/issues/78/comments","statuses_url":"https://api.github.com/repos/aspnet/Entropy/statuses/b2f74a768162389dcfe707ef8c895431440ff9bc","head":{"label":"aspnet:victorhu/tests","ref":"victorhu/tests","sha":"b2f74a768162389dcfe707ef8c895431440ff9bc","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":17118033,"name":"Entropy","full_name":"aspnet/Entropy","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Entropy","description":"A chaotic experimental playground for new features and ideas - check here for small and simple samples for individual features.","fork":false,"url":"https://api.github.com/repos/aspnet/Entropy","forks_url":"https://api.github.com/repos/aspnet/Entropy/forks","keys_url":"https://api.github.com/repos/aspnet/Entropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Entropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Entropy/teams","hooks_url":"https://api.github.com/repos/aspnet/Entropy/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Entropy/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Entropy/events","assignees_url":"https://api.github.com/repos/aspnet/Entropy/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Entropy/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Entropy/tags","blobs_url":"https://api.github.com/repos/aspnet/Entropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Entropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Entropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Entropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Entropy/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Entropy/languages","stargazers_url":"https://api.github.com/repos/aspnet/Entropy/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Entropy/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Entropy/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Entropy/subscription","commits_url":"https://api.github.com/repos/aspnet/Entropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Entropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Entropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Entropy/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Entropy/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Entropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Entropy/merges","archive_url":"https://api.github.com/repos/aspnet/Entropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Entropy/downloads","issues_url":"https://api.github.com/repos/aspnet/Entropy/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Entropy/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Entropy/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Entropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Entropy/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Entropy/releases{/id}","created_at":"2014-02-23T21:52:49Z","updated_at":"2015-11-29T19:21:38Z","pushed_at":"2015-12-03T00:16:42Z","git_url":"git://github.com/aspnet/Entropy.git","ssh_url":"git@github.com:aspnet/Entropy.git","clone_url":"https://github.com/aspnet/Entropy.git","svn_url":"https://github.com/aspnet/Entropy","homepage":"","size":1780,"stargazers_count":90,"watchers_count":90,"language":"Batchfile","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":11,"forks":32,"open_issues":11,"watchers":90,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"471b910ea433a727eca787b7eba59462c1dd4255","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":17118033,"name":"Entropy","full_name":"aspnet/Entropy","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Entropy","description":"A chaotic experimental playground for new features and ideas - check here for small and simple samples for individual features.","fork":false,"url":"https://api.github.com/repos/aspnet/Entropy","forks_url":"https://api.github.com/repos/aspnet/Entropy/forks","keys_url":"https://api.github.com/repos/aspnet/Entropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Entropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Entropy/teams","hooks_url":"https://api.github.com/repos/aspnet/Entropy/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Entropy/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Entropy/events","assignees_url":"https://api.github.com/repos/aspnet/Entropy/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Entropy/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Entropy/tags","blobs_url":"https://api.github.com/repos/aspnet/Entropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Entropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Entropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Entropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Entropy/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Entropy/languages","stargazers_url":"https://api.github.com/repos/aspnet/Entropy/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Entropy/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Entropy/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Entropy/subscription","commits_url":"https://api.github.com/repos/aspnet/Entropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Entropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Entropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Entropy/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Entropy/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Entropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Entropy/merges","archive_url":"https://api.github.com/repos/aspnet/Entropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Entropy/downloads","issues_url":"https://api.github.com/repos/aspnet/Entropy/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Entropy/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Entropy/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Entropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Entropy/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Entropy/releases{/id}","created_at":"2014-02-23T21:52:49Z","updated_at":"2015-11-29T19:21:38Z","pushed_at":"2015-12-03T00:16:42Z","git_url":"git://github.com/aspnet/Entropy.git","ssh_url":"git@github.com:aspnet/Entropy.git","clone_url":"https://github.com/aspnet/Entropy.git","svn_url":"https://github.com/aspnet/Entropy","homepage":"","size":1780,"stargazers_count":90,"watchers_count":90,"language":"Batchfile","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":11,"forks":32,"open_issues":11,"watchers":90,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Entropy/pulls/78"},"html":{"href":"https://github.com/aspnet/Entropy/pull/78"},"issue":{"href":"https://api.github.com/repos/aspnet/Entropy/issues/78"},"comments":{"href":"https://api.github.com/repos/aspnet/Entropy/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Entropy/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Entropy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Entropy/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Entropy/statuses/b2f74a768162389dcfe707ef8c895431440ff9bc"}}}}