{"action":"created","comment":{"url":"https://api.github.com/repos/apache/reef/pulls/comments/61512589","id":61512589,"diff_hunk":"@@ -0,0 +1,64 @@\n+﻿// Licensed to the Apache Software Foundation (ASF) under one\n+// or more contributor license agreements.  See the NOTICE file\n+// distributed with this work for additional information\n+// regarding copyright ownership.  The ASF licenses this file\n+// to you under the Apache License, Version 2.0 (the\n+// \"License\"); you may not use this file except in compliance\n+// with the License.  You may obtain a copy of the License at\n+//\n+//   http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing,\n+// software distributed under the License is distributed on an\n+// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+// KIND, either express or implied.  See the License for the\n+// specific language governing permissions and limitations\n+// under the License.\n+\n+using System;\n+using System.Threading;\n+using Org.Apache.REEF.Common.Tasks;\n+using Org.Apache.REEF.Tang.Annotations;\n+using Org.Apache.REEF.Utilities.Logging;\n+using Org.Apache.REEF.Common.Tasks.Events;\n+\n+namespace Org.Apache.REEF.Tests.Functional.Failure\n+{\n+    internal sealed class SleepTask : ITask, IObserver<ICloseEvent>\n+    {\n+        private static readonly Logger Logger = Logger.GetLogger(typeof(SleepTask));\n+        private const string Prefix = \"Poison: \";\n+\n+        [Inject]\n+        private SleepTask()\n+        {\n+        }\n+\n+        public void Dispose()\n+        {\n+        }\n+\n+        public byte[] Call(byte[] memento)\n+        {\n+            Logger.Log(Level.Info, Prefix + \"Will sleep for 2 seconds (expecting to be poisoned faster).\");\n+            Thread.Sleep(2000);\n+            Logger.Log(Level.Info, Prefix + \"Task sleep finished successfully.\");\n+            return null;\n+        }\n+        public void OnNext(ICloseEvent value)","path":"lang/cs/Org.Apache.REEF.Tests/Functional/Failure/SleepTask.cs","position":48,"original_position":48,"commit_id":"b87340795191217670153e402e276fa3380ec49c","original_commit_id":"b87340795191217670153e402e276fa3380ec49c","user":{"login":"jwang98052","id":5666504,"avatar_url":"https://avatars.githubusercontent.com/u/5666504?v=3","gravatar_id":"","url":"https://api.github.com/users/jwang98052","html_url":"https://github.com/jwang98052","followers_url":"https://api.github.com/users/jwang98052/followers","following_url":"https://api.github.com/users/jwang98052/following{/other_user}","gists_url":"https://api.github.com/users/jwang98052/gists{/gist_id}","starred_url":"https://api.github.com/users/jwang98052/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwang98052/subscriptions","organizations_url":"https://api.github.com/users/jwang98052/orgs","repos_url":"https://api.github.com/users/jwang98052/repos","events_url":"https://api.github.com/users/jwang98052/events{/privacy}","received_events_url":"https://api.github.com/users/jwang98052/received_events","type":"User","site_admin":false},"body":"space line","created_at":"2016-04-28T22:24:43Z","updated_at":"2016-04-28T22:24:43Z","html_url":"https://github.com/apache/reef/pull/975#discussion_r61512589","pull_request_url":"https://api.github.com/repos/apache/reef/pulls/975","_links":{"self":{"href":"https://api.github.com/repos/apache/reef/pulls/comments/61512589"},"html":{"href":"https://github.com/apache/reef/pull/975#discussion_r61512589"},"pull_request":{"href":"https://api.github.com/repos/apache/reef/pulls/975"}}},"pull_request":{"url":"https://api.github.com/repos/apache/reef/pulls/975","id":68144387,"html_url":"https://github.com/apache/reef/pull/975","diff_url":"https://github.com/apache/reef/pull/975.diff","patch_url":"https://github.com/apache/reef/pull/975.patch","issue_url":"https://api.github.com/repos/apache/reef/issues/975","number":975,"state":"open","locked":false,"title":"[REEF-1304] Create tests which use .NET Poison to validate evaluator failure scenarios","user":{"login":"tcNickolas","id":10113024,"avatar_url":"https://avatars.githubusercontent.com/u/10113024?v=3","gravatar_id":"","url":"https://api.github.com/users/tcNickolas","html_url":"https://github.com/tcNickolas","followers_url":"https://api.github.com/users/tcNickolas/followers","following_url":"https://api.github.com/users/tcNickolas/following{/other_user}","gists_url":"https://api.github.com/users/tcNickolas/gists{/gist_id}","starred_url":"https://api.github.com/users/tcNickolas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcNickolas/subscriptions","organizations_url":"https://api.github.com/users/tcNickolas/orgs","repos_url":"https://api.github.com/users/tcNickolas/repos","events_url":"https://api.github.com/users/tcNickolas/events{/privacy}","received_events_url":"https://api.github.com/users/tcNickolas/received_events","type":"User","site_admin":false},"body":"This change:\r\n * refactors helper classes SleepTask and BasePoisonedEvaluatorHandler out of PoisonTest.\r\n * changes PoisonedEventHandler to always throw exception in a separate thread.\r\n * converts PoisonTest to EvaluatorWithRunningTaskDelayedPoisonTest.\r\n * creates EvaluatorWithRunningTaskImmediatePoisonTest.\r\n\r\nJIRA:\r\n  [REEF-1304](https://issues.apache.org/jira/browse/REEF-1304)\r\n\r\nPull request:\r\n  This closes #","created_at":"2016-04-27T23:57:13Z","updated_at":"2016-04-28T22:24:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea08a0037f07b046b6548be94a05d33ddfb72463","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/reef/pulls/975/commits","review_comments_url":"https://api.github.com/repos/apache/reef/pulls/975/comments","review_comment_url":"https://api.github.com/repos/apache/reef/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/reef/issues/975/comments","statuses_url":"https://api.github.com/repos/apache/reef/statuses/b87340795191217670153e402e276fa3380ec49c","head":{"label":"tcNickolas:REEF-1304","ref":"REEF-1304","sha":"b87340795191217670153e402e276fa3380ec49c","user":{"login":"tcNickolas","id":10113024,"avatar_url":"https://avatars.githubusercontent.com/u/10113024?v=3","gravatar_id":"","url":"https://api.github.com/users/tcNickolas","html_url":"https://github.com/tcNickolas","followers_url":"https://api.github.com/users/tcNickolas/followers","following_url":"https://api.github.com/users/tcNickolas/following{/other_user}","gists_url":"https://api.github.com/users/tcNickolas/gists{/gist_id}","starred_url":"https://api.github.com/users/tcNickolas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcNickolas/subscriptions","organizations_url":"https://api.github.com/users/tcNickolas/orgs","repos_url":"https://api.github.com/users/tcNickolas/repos","events_url":"https://api.github.com/users/tcNickolas/events{/privacy}","received_events_url":"https://api.github.com/users/tcNickolas/received_events","type":"User","site_admin":false},"repo":{"id":36818251,"name":"reef","full_name":"tcNickolas/reef","owner":{"login":"tcNickolas","id":10113024,"avatar_url":"https://avatars.githubusercontent.com/u/10113024?v=3","gravatar_id":"","url":"https://api.github.com/users/tcNickolas","html_url":"https://github.com/tcNickolas","followers_url":"https://api.github.com/users/tcNickolas/followers","following_url":"https://api.github.com/users/tcNickolas/following{/other_user}","gists_url":"https://api.github.com/users/tcNickolas/gists{/gist_id}","starred_url":"https://api.github.com/users/tcNickolas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcNickolas/subscriptions","organizations_url":"https://api.github.com/users/tcNickolas/orgs","repos_url":"https://api.github.com/users/tcNickolas/repos","events_url":"https://api.github.com/users/tcNickolas/events{/privacy}","received_events_url":"https://api.github.com/users/tcNickolas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tcNickolas/reef","description":"Mirror of Apache REEF","fork":true,"url":"https://api.github.com/repos/tcNickolas/reef","forks_url":"https://api.github.com/repos/tcNickolas/reef/forks","keys_url":"https://api.github.com/repos/tcNickolas/reef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tcNickolas/reef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tcNickolas/reef/teams","hooks_url":"https://api.github.com/repos/tcNickolas/reef/hooks","issue_events_url":"https://api.github.com/repos/tcNickolas/reef/issues/events{/number}","events_url":"https://api.github.com/repos/tcNickolas/reef/events","assignees_url":"https://api.github.com/repos/tcNickolas/reef/assignees{/user}","branches_url":"https://api.github.com/repos/tcNickolas/reef/branches{/branch}","tags_url":"https://api.github.com/repos/tcNickolas/reef/tags","blobs_url":"https://api.github.com/repos/tcNickolas/reef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tcNickolas/reef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tcNickolas/reef/git/refs{/sha}","trees_url":"https://api.github.com/repos/tcNickolas/reef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tcNickolas/reef/statuses/{sha}","languages_url":"https://api.github.com/repos/tcNickolas/reef/languages","stargazers_url":"https://api.github.com/repos/tcNickolas/reef/stargazers","contributors_url":"https://api.github.com/repos/tcNickolas/reef/contributors","subscribers_url":"https://api.github.com/repos/tcNickolas/reef/subscribers","subscription_url":"https://api.github.com/repos/tcNickolas/reef/subscription","commits_url":"https://api.github.com/repos/tcNickolas/reef/commits{/sha}","git_commits_url":"https://api.github.com/repos/tcNickolas/reef/git/commits{/sha}","comments_url":"https://api.github.com/repos/tcNickolas/reef/comments{/number}","issue_comment_url":"https://api.github.com/repos/tcNickolas/reef/issues/comments{/number}","contents_url":"https://api.github.com/repos/tcNickolas/reef/contents/{+path}","compare_url":"https://api.github.com/repos/tcNickolas/reef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tcNickolas/reef/merges","archive_url":"https://api.github.com/repos/tcNickolas/reef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tcNickolas/reef/downloads","issues_url":"https://api.github.com/repos/tcNickolas/reef/issues{/number}","pulls_url":"https://api.github.com/repos/tcNickolas/reef/pulls{/number}","milestones_url":"https://api.github.com/repos/tcNickolas/reef/milestones{/number}","notifications_url":"https://api.github.com/repos/tcNickolas/reef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tcNickolas/reef/labels{/name}","releases_url":"https://api.github.com/repos/tcNickolas/reef/releases{/id}","deployments_url":"https://api.github.com/repos/tcNickolas/reef/deployments","created_at":"2015-06-03T17:08:00Z","updated_at":"2016-01-12T19:53:01Z","pushed_at":"2016-04-28T21:30:41Z","git_url":"git://github.com/tcNickolas/reef.git","ssh_url":"git@github.com:tcNickolas/reef.git","clone_url":"https://github.com/tcNickolas/reef.git","svn_url":"https://github.com/tcNickolas/reef","homepage":"","size":35022,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"apache:master","ref":"master","sha":"c90f8aa639dedae2ec44e43415bf3ddc6603a601","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":25623941,"name":"reef","full_name":"apache/reef","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/reef","description":"Mirror of Apache REEF","fork":false,"url":"https://api.github.com/repos/apache/reef","forks_url":"https://api.github.com/repos/apache/reef/forks","keys_url":"https://api.github.com/repos/apache/reef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/reef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/reef/teams","hooks_url":"https://api.github.com/repos/apache/reef/hooks","issue_events_url":"https://api.github.com/repos/apache/reef/issues/events{/number}","events_url":"https://api.github.com/repos/apache/reef/events","assignees_url":"https://api.github.com/repos/apache/reef/assignees{/user}","branches_url":"https://api.github.com/repos/apache/reef/branches{/branch}","tags_url":"https://api.github.com/repos/apache/reef/tags","blobs_url":"https://api.github.com/repos/apache/reef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/reef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/reef/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/reef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/reef/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/reef/languages","stargazers_url":"https://api.github.com/repos/apache/reef/stargazers","contributors_url":"https://api.github.com/repos/apache/reef/contributors","subscribers_url":"https://api.github.com/repos/apache/reef/subscribers","subscription_url":"https://api.github.com/repos/apache/reef/subscription","commits_url":"https://api.github.com/repos/apache/reef/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/reef/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/reef/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/reef/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/reef/contents/{+path}","compare_url":"https://api.github.com/repos/apache/reef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/reef/merges","archive_url":"https://api.github.com/repos/apache/reef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/reef/downloads","issues_url":"https://api.github.com/repos/apache/reef/issues{/number}","pulls_url":"https://api.github.com/repos/apache/reef/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/reef/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/reef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/reef/labels{/name}","releases_url":"https://api.github.com/repos/apache/reef/releases{/id}","deployments_url":"https://api.github.com/repos/apache/reef/deployments","created_at":"2014-10-23T07:00:10Z","updated_at":"2016-04-23T12:24:09Z","pushed_at":"2016-04-28T22:18:49Z","git_url":"git://github.com/apache/reef.git","ssh_url":"git@github.com:apache/reef.git","clone_url":"https://github.com/apache/reef.git","svn_url":"https://github.com/apache/reef","homepage":"","size":47902,"stargazers_count":47,"watchers_count":47,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":55,"mirror_url":"git://git.apache.org/reef.git","open_issues_count":4,"forks":55,"open_issues":4,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/reef/pulls/975"},"html":{"href":"https://github.com/apache/reef/pull/975"},"issue":{"href":"https://api.github.com/repos/apache/reef/issues/975"},"comments":{"href":"https://api.github.com/repos/apache/reef/issues/975/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/reef/pulls/975/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/reef/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/reef/pulls/975/commits"},"statuses":{"href":"https://api.github.com/repos/apache/reef/statuses/b87340795191217670153e402e276fa3380ec49c"}}}}