{"action":"created","comment":{"url":"https://api.github.com/repos/apache/beam/pulls/comments/98052107","pull_request_review_id":18682624,"id":98052107,"diff_hunk":"@@ -1232,11 +1226,47 @@ public void testWriteUnknown() throws Exception {\n         .withoutValidation());\n \n     thrown.expect(RuntimeException.class);\n-    thrown.expectMessage(\"Failed to poll the load job status\");\n-    p.run();\n+    thrown.expectMessage(\"UNKNOWN status of load job\");\n+    try {\n+      p.run();\n+    } finally {\n+      File tempDir = new File(bqOptions.getTempLocation());\n+      testNumFiles(tempDir, 0);\n+    }\n+  }\n \n-    File tempDir = new File(bqOptions.getTempLocation());\n-    testNumFiles(tempDir, 0);\n+  @Test\n+  @Category(NeedsRunner.class)\n+  public void testWriteFailedJobs() throws Exception {\n+    BigQueryOptions bqOptions = TestPipeline.testingPipelineOptions().as(BigQueryOptions.class);\n+    bqOptions.setProject(\"defaultProject\");\n+    bqOptions.setTempLocation(testFolder.newFolder(\"BigQueryIOTest\").getAbsolutePath());\n+\n+    FakeBigQueryServices fakeBqServices = new FakeBigQueryServices()\n+        .withJobService(new FakeJobService()\n+            .startJobReturns(\"done\", \"done\", \"done\")\n+            .pollJobReturns(Status.FAILED, Status.FAILED, Status.FAILED));\n+\n+    Pipeline p = TestPipeline.create(bqOptions);\n+    p.apply(Create.of(\n+        new TableRow().set(\"name\", \"a\").set(\"number\", 1),\n+        new TableRow().set(\"name\", \"b\").set(\"number\", 2),\n+        new TableRow().set(\"name\", \"c\").set(\"number\", 3))\n+        .withCoder(TableRowJsonCoder.of()))\n+        .apply(BigQueryIO.Write.to(\"dataset-id.table-id\")\n+            .withCreateDisposition(CreateDisposition.CREATE_NEVER)\n+            .withTestServices(fakeBqServices)\n+            .withoutValidation());\n+\n+    thrown.expect(RuntimeException.class);\n+    thrown.expectMessage(\"Failed to create load job with id prefix\");","path":"sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIOTest.java","position":54,"original_position":54,"commit_id":"47840ca999f75a419769783e8f5a779db033c36d","original_commit_id":"47840ca999f75a419769783e8f5a779db033c36d","user":{"login":"dhalperi","id":526415,"avatar_url":"https://avatars.githubusercontent.com/u/526415?v=3","gravatar_id":"","url":"https://api.github.com/users/dhalperi","html_url":"https://github.com/dhalperi","followers_url":"https://api.github.com/users/dhalperi/followers","following_url":"https://api.github.com/users/dhalperi/following{/other_user}","gists_url":"https://api.github.com/users/dhalperi/gists{/gist_id}","starred_url":"https://api.github.com/users/dhalperi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhalperi/subscriptions","organizations_url":"https://api.github.com/users/dhalperi/orgs","repos_url":"https://api.github.com/users/dhalperi/repos","events_url":"https://api.github.com/users/dhalperi/events{/privacy}","received_events_url":"https://api.github.com/users/dhalperi/received_events","type":"User","site_admin":false},"body":"nor does this seem to verify that a useful error is logged or thrown.","created_at":"2017-01-26T17:59:14Z","updated_at":"2017-01-26T17:59:50Z","html_url":"https://github.com/apache/beam/pull/1823#discussion_r98052107","pull_request_url":"https://api.github.com/repos/apache/beam/pulls/1823","_links":{"self":{"href":"https://api.github.com/repos/apache/beam/pulls/comments/98052107"},"html":{"href":"https://github.com/apache/beam/pull/1823#discussion_r98052107"},"pull_request":{"href":"https://api.github.com/repos/apache/beam/pulls/1823"}}},"pull_request":{"url":"https://api.github.com/repos/apache/beam/pulls/1823","id":102830101,"html_url":"https://github.com/apache/beam/pull/1823","diff_url":"https://github.com/apache/beam/pull/1823.diff","patch_url":"https://github.com/apache/beam/pull/1823.patch","issue_url":"https://api.github.com/repos/apache/beam/issues/1823","number":1823,"state":"open","locked":false,"title":"[BEAM-1235] BigQueryIO.Write: log failed load/copy jobs.","user":{"login":"peihe","id":10201797,"avatar_url":"https://avatars.githubusercontent.com/u/10201797?v=3","gravatar_id":"","url":"https://api.github.com/users/peihe","html_url":"https://github.com/peihe","followers_url":"https://api.github.com/users/peihe/followers","following_url":"https://api.github.com/users/peihe/following{/other_user}","gists_url":"https://api.github.com/users/peihe/gists{/gist_id}","starred_url":"https://api.github.com/users/peihe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peihe/subscriptions","organizations_url":"https://api.github.com/users/peihe/orgs","repos_url":"https://api.github.com/users/peihe/repos","events_url":"https://api.github.com/users/peihe/events{/privacy}","received_events_url":"https://api.github.com/users/peihe/received_events","type":"User","site_admin":false},"body":"Be sure to do all of the following to help us incorporate your contribution\r\nquickly and easily:\r\n\r\n - [ ] Make sure the PR title is formatted like:\r\n   `[BEAM-<Jira issue #>] Description of pull request`\r\n - [ ] Make sure tests pass via `mvn clean verify`. (Even better, enable\r\n       Travis-CI on your fork and ensure the whole test matrix passes).\r\n - [ ] Replace `<Jira issue #>` in the title with the actual Jira issue\r\n       number, if there is one.\r\n - [ ] If this contribution is large, please file an Apache\r\n       [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.txt).\r\n\r\n---\r\n","created_at":"2017-01-24T00:27:24Z","updated_at":"2017-01-26T17:59:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d73e5bf758d46e11bf0c823ed061dbab076f7109","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/beam/pulls/1823/commits","review_comments_url":"https://api.github.com/repos/apache/beam/pulls/1823/comments","review_comment_url":"https://api.github.com/repos/apache/beam/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/beam/issues/1823/comments","statuses_url":"https://api.github.com/repos/apache/beam/statuses/47840ca999f75a419769783e8f5a779db033c36d","head":{"label":"peihe:bq-job-error","ref":"bq-job-error","sha":"47840ca999f75a419769783e8f5a779db033c36d","user":{"login":"peihe","id":10201797,"avatar_url":"https://avatars.githubusercontent.com/u/10201797?v=3","gravatar_id":"","url":"https://api.github.com/users/peihe","html_url":"https://github.com/peihe","followers_url":"https://api.github.com/users/peihe/followers","following_url":"https://api.github.com/users/peihe/following{/other_user}","gists_url":"https://api.github.com/users/peihe/gists{/gist_id}","starred_url":"https://api.github.com/users/peihe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peihe/subscriptions","organizations_url":"https://api.github.com/users/peihe/orgs","repos_url":"https://api.github.com/users/peihe/repos","events_url":"https://api.github.com/users/peihe/events{/privacy}","received_events_url":"https://api.github.com/users/peihe/received_events","type":"User","site_admin":false},"repo":{"id":52831526,"name":"incubator-beam","full_name":"peihe/incubator-beam","owner":{"login":"peihe","id":10201797,"avatar_url":"https://avatars.githubusercontent.com/u/10201797?v=3","gravatar_id":"","url":"https://api.github.com/users/peihe","html_url":"https://github.com/peihe","followers_url":"https://api.github.com/users/peihe/followers","following_url":"https://api.github.com/users/peihe/following{/other_user}","gists_url":"https://api.github.com/users/peihe/gists{/gist_id}","starred_url":"https://api.github.com/users/peihe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peihe/subscriptions","organizations_url":"https://api.github.com/users/peihe/orgs","repos_url":"https://api.github.com/users/peihe/repos","events_url":"https://api.github.com/users/peihe/events{/privacy}","received_events_url":"https://api.github.com/users/peihe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/peihe/incubator-beam","description":"Mirror of Apache Beam (Incubating)","fork":true,"url":"https://api.github.com/repos/peihe/incubator-beam","forks_url":"https://api.github.com/repos/peihe/incubator-beam/forks","keys_url":"https://api.github.com/repos/peihe/incubator-beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peihe/incubator-beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peihe/incubator-beam/teams","hooks_url":"https://api.github.com/repos/peihe/incubator-beam/hooks","issue_events_url":"https://api.github.com/repos/peihe/incubator-beam/issues/events{/number}","events_url":"https://api.github.com/repos/peihe/incubator-beam/events","assignees_url":"https://api.github.com/repos/peihe/incubator-beam/assignees{/user}","branches_url":"https://api.github.com/repos/peihe/incubator-beam/branches{/branch}","tags_url":"https://api.github.com/repos/peihe/incubator-beam/tags","blobs_url":"https://api.github.com/repos/peihe/incubator-beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peihe/incubator-beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peihe/incubator-beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/peihe/incubator-beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peihe/incubator-beam/statuses/{sha}","languages_url":"https://api.github.com/repos/peihe/incubator-beam/languages","stargazers_url":"https://api.github.com/repos/peihe/incubator-beam/stargazers","contributors_url":"https://api.github.com/repos/peihe/incubator-beam/contributors","subscribers_url":"https://api.github.com/repos/peihe/incubator-beam/subscribers","subscription_url":"https://api.github.com/repos/peihe/incubator-beam/subscription","commits_url":"https://api.github.com/repos/peihe/incubator-beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/peihe/incubator-beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/peihe/incubator-beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/peihe/incubator-beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/peihe/incubator-beam/contents/{+path}","compare_url":"https://api.github.com/repos/peihe/incubator-beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peihe/incubator-beam/merges","archive_url":"https://api.github.com/repos/peihe/incubator-beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peihe/incubator-beam/downloads","issues_url":"https://api.github.com/repos/peihe/incubator-beam/issues{/number}","pulls_url":"https://api.github.com/repos/peihe/incubator-beam/pulls{/number}","milestones_url":"https://api.github.com/repos/peihe/incubator-beam/milestones{/number}","notifications_url":"https://api.github.com/repos/peihe/incubator-beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peihe/incubator-beam/labels{/name}","releases_url":"https://api.github.com/repos/peihe/incubator-beam/releases{/id}","deployments_url":"https://api.github.com/repos/peihe/incubator-beam/deployments","created_at":"2016-02-29T23:06:11Z","updated_at":"2016-02-29T23:06:15Z","pushed_at":"2017-01-26T02:27:38Z","git_url":"git://github.com/peihe/incubator-beam.git","ssh_url":"git@github.com:peihe/incubator-beam.git","clone_url":"https://github.com/peihe/incubator-beam.git","svn_url":"https://github.com/peihe/incubator-beam","homepage":null,"size":24934,"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":"cb6e0a80c57b056489d447cde092cffdd041eed5","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":50904245,"name":"beam","full_name":"apache/beam","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/beam","description":"Mirror of Apache Beam","fork":false,"url":"https://api.github.com/repos/apache/beam","forks_url":"https://api.github.com/repos/apache/beam/forks","keys_url":"https://api.github.com/repos/apache/beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/beam/teams","hooks_url":"https://api.github.com/repos/apache/beam/hooks","issue_events_url":"https://api.github.com/repos/apache/beam/issues/events{/number}","events_url":"https://api.github.com/repos/apache/beam/events","assignees_url":"https://api.github.com/repos/apache/beam/assignees{/user}","branches_url":"https://api.github.com/repos/apache/beam/branches{/branch}","tags_url":"https://api.github.com/repos/apache/beam/tags","blobs_url":"https://api.github.com/repos/apache/beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/beam/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/beam/languages","stargazers_url":"https://api.github.com/repos/apache/beam/stargazers","contributors_url":"https://api.github.com/repos/apache/beam/contributors","subscribers_url":"https://api.github.com/repos/apache/beam/subscribers","subscription_url":"https://api.github.com/repos/apache/beam/subscription","commits_url":"https://api.github.com/repos/apache/beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/beam/contents/{+path}","compare_url":"https://api.github.com/repos/apache/beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/beam/merges","archive_url":"https://api.github.com/repos/apache/beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/beam/downloads","issues_url":"https://api.github.com/repos/apache/beam/issues{/number}","pulls_url":"https://api.github.com/repos/apache/beam/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/beam/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/beam/labels{/name}","releases_url":"https://api.github.com/repos/apache/beam/releases{/id}","deployments_url":"https://api.github.com/repos/apache/beam/deployments","created_at":"2016-02-02T08:00:06Z","updated_at":"2017-01-26T15:31:21Z","pushed_at":"2017-01-26T17:38:27Z","git_url":"git://github.com/apache/beam.git","ssh_url":"git@github.com:apache/beam.git","clone_url":"https://github.com/apache/beam.git","svn_url":"https://github.com/apache/beam","homepage":"","size":27267,"stargazers_count":740,"watchers_count":740,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":407,"mirror_url":"git://git.apache.org/beam.git","open_issues_count":65,"forks":407,"open_issues":65,"watchers":740,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/beam/pulls/1823"},"html":{"href":"https://github.com/apache/beam/pull/1823"},"issue":{"href":"https://api.github.com/repos/apache/beam/issues/1823"},"comments":{"href":"https://api.github.com/repos/apache/beam/issues/1823/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/beam/pulls/1823/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/beam/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/beam/pulls/1823/commits"},"statuses":{"href":"https://api.github.com/repos/apache/beam/statuses/47840ca999f75a419769783e8f5a779db033c36d"}}}}
{"actor":{"display_login":"dhalperi"}}