{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/wcf/pulls/comments/39737873","id":39737873,"diff_hunk":"@@ -69,16 +79,136 @@ private void DoTheRun(int iterations)\n             StaticDisposablesHelper.DisposeAll();\n         }\n \n-        public void RunAllStressTests()\n+        public static void RunAllStressTests()\n+        {\n+            //A full cycle of create/use/destroy\n+            CreateAndCloseFactoryAndChannelFullCycleTest<WcfService1.IService1, HelloWorldTest>.CreateFactoriesAndChannelsUseAllOnceCloseAll();\n+            //CreateAndCloseFactoryAndChannelFullCycleTest<WcfService1.IDuplexService, DuplexTest>.CreateFactoriesAndChannelsUseAllOnceCloseAll();\n+            CreateAndCloseFactoryAndChannelFullCycleTest<WcfService1.IStreamingService, StreamingTest>.CreateFactoriesAndChannelsUseAllOnceCloseAll();\n+\n+            // Pool channel factories and always create/destroy channels\n+            PooledFactories<WcfService1.IService1, HelloWorldTest>.CreateUseAndCloseChannels();\n+            //PooledFactories<WcfService1.IDuplexService, DuplexTest>.CreateUseAndCloseChannels();\n+            PooledFactories<WcfService1.IStreamingService, StreamingTest>.CreateUseAndCloseChannels();\n+\n+            // Pool channel factories, always create/destroy channels, recycle factories while using them\n+            RecyclablePooledFactories<WcfService1.IService1, HelloWorldTest>.RunAllScenariosWithWeights(100, 1);\n+            //RecyclablePooledFactories<WcfService1.IDuplexService, DuplexTest>.RunAllScenariosWithWeights(100, 1);\n+            RecyclablePooledFactories<WcfService1.IStreamingService, StreamingTest>.RunAllScenariosWithWeights(100, 1);\n+\n+            // Pool both channel factories and channels, never recycle\n+            PooledFactoriesAndChannels<WcfService1.IService1, HelloWorldTest>.UseChannelsInPooledFactoriesAndChannels();\n+            //PooledFactoriesAndChannels<WcfService1.IDuplexService, DuplexTest>.UseChannelsInPooledFactoriesAndChannels();\n+            PooledFactoriesAndChannels<WcfService1.IStreamingService, StreamingTest>.UseChannelsInPooledFactoriesAndChannels();\n+\n+\n+            //// These will get stuck with wcf/issues/108\n+            //// So we comment them out and use *_OpenOnce workaround instead\n+            //RecyclablePooledFactoriesAndChannels<WcfService1.IService1, HelloWorldTestTemplate>.RunAllScenariosWithWeights(100, 1, 1);\n+            //RecyclablePooledFactoriesAndChannels<WcfService1.IDuplexService, DuplexTestTemplate>.RunAllScenariosWithWeights(100, 1, 1);\n+            //RecyclablePooledFactoriesAndChannels<WcfService1.IStreamingService, StreamingTest>.RunAllScenariosWithWeights(100, 1, 1);\n+\n+            // Pool both channel factories and channels, recycle both factories and channels while using them \n+            RecyclablePooledFactoriesAndChannels_OpenOnce<WcfService1.IService1, HelloWorldTest>.RunAllScenariosWithWeights(100, 1, 1);\n+            //RecyclablePooledFactoriesAndChannels_OpenOnce<WcfService1.IDuplexService, DuplexTest>.RunAllScenariosWithWeights(100, 1, 1);\n+            RecyclablePooledFactoriesAndChannels_OpenOnce<WcfService1.IStreamingService, StreamingTest>.RunAllScenariosWithWeights(100, 1, 1);\n+            \n+\n+            // Pool both factories and channels, use their async methods, recycle both factories and channels while using them\n+            RecyclablePooledFactoriesAndChannelsAsync_OpenOnce<WcfService1.IService1, HelloWorldTest>.RunAllScenariosWithWeightsAsync(1000, 1, 1).Wait();\n+            //RecyclablePooledFactoriesAndChannelsAsync_OpenOnce<WcfService1.IDuplexService, DuplexTest>.RunAllScenariosWithWeightsAsync(1000, 1, 1).Wait();\n+            //RecyclablePooledFactoriesAndChannelsAsync_OpenOnce<WcfService1.IStreamingService, StreamingTest>.RunAllScenariosWithWeightsAsync(1000, 1, 1).Wait();\n+\n+            // Add more async tests to achieve parity with sync tests\n+        }\n+\n+        // We need a better grouping of tests per binding/feature/stress scenario.\n+        // But for now we simply group them in 2 methods below for Http&Net.Tcp binding.\n+        // The switch between the protocol being used is in the call to TestHelpers.SetHostAndProtocol(useHttp: true/false, ...)\n+\n+        // This is a copy of RunAllStressTests with the tests that are not supported by Http binding commented out\n+        public static void RunAllHttpStressTests()\n+        {\n+            //A full cycle of create/use/destroy\n+            CreateAndCloseFactoryAndChannelFullCycleTest<WcfService1.IService1, HelloWorldTest>.CreateFactoriesAndChannelsUseAllOnceCloseAll();\n+            //CreateAndCloseFactoryAndChannelFullCycleTest<WcfService1.IDuplexService, DuplexTest>.CreateFactoriesAndChannelsUseAllOnceCloseAll();\n+            CreateAndCloseFactoryAndChannelFullCycleTest<WcfService1.IStreamingService, StreamingTest>.CreateFactoriesAndChannelsUseAllOnceCloseAll();\n+\n+            // Pool channel factories and always create/destroy channels\n+            PooledFactories<WcfService1.IService1, HelloWorldTest>.CreateUseAndCloseChannels();\n+            //PooledFactories<WcfService1.IDuplexService, DuplexTest>.CreateUseAndCloseChannels();\n+            PooledFactories<WcfService1.IStreamingService, StreamingTest>.CreateUseAndCloseChannels();\n+\n+            // Pool channel factories, always create/destroy channels, recycle factories while using them\n+            RecyclablePooledFactories<WcfService1.IService1, HelloWorldTest>.RunAllScenariosWithWeights(100, 1);\n+            //RecyclablePooledFactories<WcfService1.IDuplexService, DuplexTest>.RunAllScenariosWithWeights(100, 1);\n+            RecyclablePooledFactories<WcfService1.IStreamingService, StreamingTest>.RunAllScenariosWithWeights(100, 1);\n+\n+            // Pool both channel factories and channels, never recycle\n+            PooledFactoriesAndChannels<WcfService1.IService1, HelloWorldTest>.UseChannelsInPooledFactoriesAndChannels();\n+            //PooledFactoriesAndChannels<WcfService1.IDuplexService, DuplexTest>.UseChannelsInPooledFactoriesAndChannels();\n+            PooledFactoriesAndChannels<WcfService1.IStreamingService, StreamingTest>.UseChannelsInPooledFactoriesAndChannels();\n+\n+\n+            //// These will get stuck with wcf/issues/108\n+            //// So we comment them out and use *_OpenOnce workaround instead","path":"src/System.Private.ServiceModel/tests/Stress/SharedPoolsOfWCFObjects/Program.cs","position":139,"original_position":139,"commit_id":"45b4afe651df9ea7bcd74380ed57c0e62b3b152f","original_commit_id":"45b4afe651df9ea7bcd74380ed57c0e62b3b152f","user":{"login":"roncain","id":3913124,"avatar_url":"https://avatars.githubusercontent.com/u/3913124?v=3","gravatar_id":"","url":"https://api.github.com/users/roncain","html_url":"https://github.com/roncain","followers_url":"https://api.github.com/users/roncain/followers","following_url":"https://api.github.com/users/roncain/following{/other_user}","gists_url":"https://api.github.com/users/roncain/gists{/gist_id}","starred_url":"https://api.github.com/users/roncain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roncain/subscriptions","organizations_url":"https://api.github.com/users/roncain/orgs","repos_url":"https://api.github.com/users/roncain/repos","events_url":"https://api.github.com/users/roncain/events{/privacy}","received_events_url":"https://api.github.com/users/roncain/received_events","type":"User","site_admin":false},"body":"Thoughts for the future -- if possible consider making each of these a separate test and allow xunit to be the mechanism that runs them.  We already have an [ActiveIssue(###)] attribute to disable tests known to fail.","created_at":"2015-09-17T12:09:58Z","updated_at":"2015-09-17T12:09:58Z","html_url":"https://github.com/dotnet/wcf/pull/340#discussion_r39737873","pull_request_url":"https://api.github.com/repos/dotnet/wcf/pulls/340","_links":{"self":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/comments/39737873"},"html":{"href":"https://github.com/dotnet/wcf/pull/340#discussion_r39737873"},"pull_request":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/340"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/wcf/pulls/340","id":45253938,"html_url":"https://github.com/dotnet/wcf/pull/340","diff_url":"https://github.com/dotnet/wcf/pull/340.diff","patch_url":"https://github.com/dotnet/wcf/pull/340.patch","issue_url":"https://api.github.com/repos/dotnet/wcf/issues/340","number":340,"state":"open","locked":false,"title":"Updating stress tests","user":{"login":"KKhurin","id":2626148,"avatar_url":"https://avatars.githubusercontent.com/u/2626148?v=3","gravatar_id":"","url":"https://api.github.com/users/KKhurin","html_url":"https://github.com/KKhurin","followers_url":"https://api.github.com/users/KKhurin/followers","following_url":"https://api.github.com/users/KKhurin/following{/other_user}","gists_url":"https://api.github.com/users/KKhurin/gists{/gist_id}","starred_url":"https://api.github.com/users/KKhurin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KKhurin/subscriptions","organizations_url":"https://api.github.com/users/KKhurin/orgs","repos_url":"https://api.github.com/users/KKhurin/repos","events_url":"https://api.github.com/users/KKhurin/events{/privacy}","received_events_url":"https://api.github.com/users/KKhurin/received_events","type":"User","site_admin":false},"body":"- added more stress scenarios\r\n- added support for duplex\r\n- added support for streaming","created_at":"2015-09-17T05:44:33Z","updated_at":"2015-09-17T12:09:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"86cff420f78281adffe54c3d62e4de1ea9e76963","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/wcf/pulls/340/commits","review_comments_url":"https://api.github.com/repos/dotnet/wcf/pulls/340/comments","review_comment_url":"https://api.github.com/repos/dotnet/wcf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/wcf/issues/340/comments","statuses_url":"https://api.github.com/repos/dotnet/wcf/statuses/45b4afe651df9ea7bcd74380ed57c0e62b3b152f","head":{"label":"KKhurin:stresstests","ref":"stresstests","sha":"45b4afe651df9ea7bcd74380ed57c0e62b3b152f","user":{"login":"KKhurin","id":2626148,"avatar_url":"https://avatars.githubusercontent.com/u/2626148?v=3","gravatar_id":"","url":"https://api.github.com/users/KKhurin","html_url":"https://github.com/KKhurin","followers_url":"https://api.github.com/users/KKhurin/followers","following_url":"https://api.github.com/users/KKhurin/following{/other_user}","gists_url":"https://api.github.com/users/KKhurin/gists{/gist_id}","starred_url":"https://api.github.com/users/KKhurin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KKhurin/subscriptions","organizations_url":"https://api.github.com/users/KKhurin/orgs","repos_url":"https://api.github.com/users/KKhurin/repos","events_url":"https://api.github.com/users/KKhurin/events{/privacy}","received_events_url":"https://api.github.com/users/KKhurin/received_events","type":"User","site_admin":false},"repo":{"id":39415407,"name":"wcf","full_name":"KKhurin/wcf","owner":{"login":"KKhurin","id":2626148,"avatar_url":"https://avatars.githubusercontent.com/u/2626148?v=3","gravatar_id":"","url":"https://api.github.com/users/KKhurin","html_url":"https://github.com/KKhurin","followers_url":"https://api.github.com/users/KKhurin/followers","following_url":"https://api.github.com/users/KKhurin/following{/other_user}","gists_url":"https://api.github.com/users/KKhurin/gists{/gist_id}","starred_url":"https://api.github.com/users/KKhurin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KKhurin/subscriptions","organizations_url":"https://api.github.com/users/KKhurin/orgs","repos_url":"https://api.github.com/users/KKhurin/repos","events_url":"https://api.github.com/users/KKhurin/events{/privacy}","received_events_url":"https://api.github.com/users/KKhurin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KKhurin/wcf","description":"This repo contains the client-oriented WCF libraries that enable applications built on .NET Core to communicate with WCF services.","fork":true,"url":"https://api.github.com/repos/KKhurin/wcf","forks_url":"https://api.github.com/repos/KKhurin/wcf/forks","keys_url":"https://api.github.com/repos/KKhurin/wcf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KKhurin/wcf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KKhurin/wcf/teams","hooks_url":"https://api.github.com/repos/KKhurin/wcf/hooks","issue_events_url":"https://api.github.com/repos/KKhurin/wcf/issues/events{/number}","events_url":"https://api.github.com/repos/KKhurin/wcf/events","assignees_url":"https://api.github.com/repos/KKhurin/wcf/assignees{/user}","branches_url":"https://api.github.com/repos/KKhurin/wcf/branches{/branch}","tags_url":"https://api.github.com/repos/KKhurin/wcf/tags","blobs_url":"https://api.github.com/repos/KKhurin/wcf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KKhurin/wcf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KKhurin/wcf/git/refs{/sha}","trees_url":"https://api.github.com/repos/KKhurin/wcf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KKhurin/wcf/statuses/{sha}","languages_url":"https://api.github.com/repos/KKhurin/wcf/languages","stargazers_url":"https://api.github.com/repos/KKhurin/wcf/stargazers","contributors_url":"https://api.github.com/repos/KKhurin/wcf/contributors","subscribers_url":"https://api.github.com/repos/KKhurin/wcf/subscribers","subscription_url":"https://api.github.com/repos/KKhurin/wcf/subscription","commits_url":"https://api.github.com/repos/KKhurin/wcf/commits{/sha}","git_commits_url":"https://api.github.com/repos/KKhurin/wcf/git/commits{/sha}","comments_url":"https://api.github.com/repos/KKhurin/wcf/comments{/number}","issue_comment_url":"https://api.github.com/repos/KKhurin/wcf/issues/comments{/number}","contents_url":"https://api.github.com/repos/KKhurin/wcf/contents/{+path}","compare_url":"https://api.github.com/repos/KKhurin/wcf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KKhurin/wcf/merges","archive_url":"https://api.github.com/repos/KKhurin/wcf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KKhurin/wcf/downloads","issues_url":"https://api.github.com/repos/KKhurin/wcf/issues{/number}","pulls_url":"https://api.github.com/repos/KKhurin/wcf/pulls{/number}","milestones_url":"https://api.github.com/repos/KKhurin/wcf/milestones{/number}","notifications_url":"https://api.github.com/repos/KKhurin/wcf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KKhurin/wcf/labels{/name}","releases_url":"https://api.github.com/repos/KKhurin/wcf/releases{/id}","created_at":"2015-07-21T00:37:56Z","updated_at":"2015-07-21T00:37:59Z","pushed_at":"2015-09-17T05:35:52Z","git_url":"git://github.com/KKhurin/wcf.git","ssh_url":"git@github.com:KKhurin/wcf.git","clone_url":"https://github.com/KKhurin/wcf.git","svn_url":"https://github.com/KKhurin/wcf","homepage":"","size":2381,"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":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"240aeb46e638916d932d66d3ee920a24765a1a2f","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":35562993,"name":"wcf","full_name":"dotnet/wcf","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/wcf","description":"This repo contains the client-oriented WCF libraries that enable applications built on .NET Core to communicate with WCF services.","fork":false,"url":"https://api.github.com/repos/dotnet/wcf","forks_url":"https://api.github.com/repos/dotnet/wcf/forks","keys_url":"https://api.github.com/repos/dotnet/wcf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/wcf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/wcf/teams","hooks_url":"https://api.github.com/repos/dotnet/wcf/hooks","issue_events_url":"https://api.github.com/repos/dotnet/wcf/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/wcf/events","assignees_url":"https://api.github.com/repos/dotnet/wcf/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/wcf/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/wcf/tags","blobs_url":"https://api.github.com/repos/dotnet/wcf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/wcf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/wcf/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/wcf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/wcf/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/wcf/languages","stargazers_url":"https://api.github.com/repos/dotnet/wcf/stargazers","contributors_url":"https://api.github.com/repos/dotnet/wcf/contributors","subscribers_url":"https://api.github.com/repos/dotnet/wcf/subscribers","subscription_url":"https://api.github.com/repos/dotnet/wcf/subscription","commits_url":"https://api.github.com/repos/dotnet/wcf/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/wcf/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/wcf/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/wcf/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/wcf/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/wcf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/wcf/merges","archive_url":"https://api.github.com/repos/dotnet/wcf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/wcf/downloads","issues_url":"https://api.github.com/repos/dotnet/wcf/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/wcf/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/wcf/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/wcf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/wcf/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/wcf/releases{/id}","created_at":"2015-05-13T17:17:03Z","updated_at":"2015-09-17T00:17:43Z","pushed_at":"2015-09-17T05:44:34Z","git_url":"git://github.com/dotnet/wcf.git","ssh_url":"git@github.com:dotnet/wcf.git","clone_url":"https://github.com/dotnet/wcf.git","svn_url":"https://github.com/dotnet/wcf","homepage":"","size":4773,"stargazers_count":509,"watchers_count":509,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":145,"mirror_url":null,"open_issues_count":89,"forks":145,"open_issues":89,"watchers":509,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/340"},"html":{"href":"https://github.com/dotnet/wcf/pull/340"},"issue":{"href":"https://api.github.com/repos/dotnet/wcf/issues/340"},"comments":{"href":"https://api.github.com/repos/dotnet/wcf/issues/340/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/340/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/wcf/pulls/340/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/wcf/statuses/45b4afe651df9ea7bcd74380ed57c0e62b3b152f"}}}}