beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject [6/6] incubator-beam git commit: Make TestDataflowRunner crash message actionable
Date Thu, 10 Nov 2016 18:49:46 GMT
Make TestDataflowRunner crash message actionable


Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/5653b860
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/5653b860
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/5653b860

Branch: refs/heads/master
Commit: 5653b860dbe64f61707c093fff5bf14061e772d0
Parents: 7344914
Author: Kenneth Knowles <klk@google.com>
Authored: Wed Nov 9 14:36:54 2016 -0800
Committer: Kenneth Knowles <klk@google.com>
Committed: Thu Nov 10 10:49:28 2016 -0800

----------------------------------------------------------------------
 .../apache/beam/runners/dataflow/testing/TestDataflowRunner.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/5653b860/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/testing/TestDataflowRunner.java
----------------------------------------------------------------------
diff --git a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/testing/TestDataflowRunner.java
b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/testing/TestDataflowRunner.java
index 9dacfd3..10c72b7 100644
--- a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/testing/TestDataflowRunner.java
+++ b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/testing/TestDataflowRunner.java
@@ -152,7 +152,9 @@ public class TestDataflowRunner extends PipelineRunner<DataflowPipelineJob>
{
       } else if (!success.get()) {
         throw new AssertionError(
             Strings.isNullOrEmpty(messageHandler.getErrorMessage())
-                ? "The dataflow did not return a failure reason."
+                ? String.format(
+                    "Dataflow job %s terminated in state %s but did not return a failure
reason.",
+                    job.getJobId(), job.getState())
                 : messageHandler.getErrorMessage());
       } else {
         assertThat(job, testPipelineOptions.getOnSuccessMatcher());


Mime
View raw message