From d6ccb97524fce7cb8a6053ae2815b4cda89350ef Mon Sep 17 00:00:00 2001 From: Pei He Date: Fri, 11 Nov 2016 14:13:02 -0800 Subject: [PATCH 1/2] WordCountIT: uses input with fewer keys. --- .../java/org/apache/beam/examples/WindowedWordCountIT.java | 5 ++++- .../src/test/java/org/apache/beam/examples/WordCountIT.java | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/java/src/test/java/org/apache/beam/examples/WindowedWordCountIT.java b/examples/java/src/test/java/org/apache/beam/examples/WindowedWordCountIT.java index a5113c8bf6be..9f30ec8f3d2b 100644 --- a/examples/java/src/test/java/org/apache/beam/examples/WindowedWordCountIT.java +++ b/examples/java/src/test/java/org/apache/beam/examples/WindowedWordCountIT.java @@ -38,7 +38,9 @@ @RunWith(JUnit4.class) public class WindowedWordCountIT { - private static final String DEFAULT_OUTPUT_CHECKSUM = "ff54f6f42b2afeb146206c1e8e915deaee0362b4"; + private static final String DEFAULT_INPUT = + "gs://apache-beam-samples/shakespeare/winterstale-personae"; + private static final String DEFAULT_OUTPUT_CHECKSUM = "cd5b52939257e12428a9fa085c32a84dd209b180"; /** * Options for the {@link WindowedWordCount} Integration Test. @@ -68,6 +70,7 @@ private void testWindowedWordCountPipeline(boolean isStreaming) throws IOExcepti TestPipeline.testingPipelineOptions().as(WindowedWordCountITOptions.class); options.setStreaming(isStreaming); options.setTestTimeoutSeconds(1200L); + options.setInputFile(DEFAULT_INPUT); // Note: currently unused because the example writes to BigQuery, but WindowedWordCount.Options // are tightly coupled to WordCount.Options, where the option is required. diff --git a/examples/java/src/test/java/org/apache/beam/examples/WordCountIT.java b/examples/java/src/test/java/org/apache/beam/examples/WordCountIT.java index 487f04b488f6..f2afe6aefbda 100644 --- a/examples/java/src/test/java/org/apache/beam/examples/WordCountIT.java +++ b/examples/java/src/test/java/org/apache/beam/examples/WordCountIT.java @@ -36,7 +36,9 @@ @RunWith(JUnit4.class) public class WordCountIT { - private static final String DEFAULT_OUTPUT_CHECKSUM = "8ae94f799f97cfd1cb5e8125951b32dfb52e1f12"; + private static final String DEFAULT_INPUT = + "gs://apache-beam-samples/shakespeare/winterstale-personae"; + private static final String DEFAULT_OUTPUT_CHECKSUM = "508517575eba8d8d5a54f7f0080a00951cfe84ca"; /** * Options for the WordCount Integration Test. @@ -56,6 +58,7 @@ public static void setUp() { public void testE2EWordCount() throws Exception { WordCountITOptions options = TestPipeline.testingPipelineOptions().as(WordCountITOptions.class); + options.setInputFile(DEFAULT_INPUT); options.setOutput(IOChannelUtils.resolve( options.getTempRoot(), String.format("WordCountIT-%tF-% Date: Fri, 11 Nov 2016 15:57:09 -0800 Subject: [PATCH 2/2] fixup! address comments. --- .../test/java/org/apache/beam/examples/WindowedWordCountIT.java | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/java/src/test/java/org/apache/beam/examples/WindowedWordCountIT.java b/examples/java/src/test/java/org/apache/beam/examples/WindowedWordCountIT.java index 9f30ec8f3d2b..5d77dd570395 100644 --- a/examples/java/src/test/java/org/apache/beam/examples/WindowedWordCountIT.java +++ b/examples/java/src/test/java/org/apache/beam/examples/WindowedWordCountIT.java @@ -69,7 +69,6 @@ private void testWindowedWordCountPipeline(boolean isStreaming) throws IOExcepti WindowedWordCountITOptions options = TestPipeline.testingPipelineOptions().as(WindowedWordCountITOptions.class); options.setStreaming(isStreaming); - options.setTestTimeoutSeconds(1200L); options.setInputFile(DEFAULT_INPUT); // Note: currently unused because the example writes to BigQuery, but WindowedWordCount.Options