|
46 | 46 | import com.google.cloud.dataflow.sdk.coders.Coder; |
47 | 47 | import com.google.cloud.dataflow.sdk.coders.VarLongCoder; |
48 | 48 | import com.google.cloud.dataflow.sdk.io.AvroIO; |
| 49 | +import com.google.cloud.dataflow.sdk.io.AvroSource; |
| 50 | +import com.google.cloud.dataflow.sdk.io.BigQueryIO; |
49 | 51 | import com.google.cloud.dataflow.sdk.io.Read; |
50 | 52 | import com.google.cloud.dataflow.sdk.io.TextIO; |
51 | 53 | import com.google.cloud.dataflow.sdk.options.DataflowPipelineDebugOptions; |
@@ -928,6 +930,33 @@ private void testUnsupportedSource(PTransform<PInput, ?> source, String name, bo |
928 | 930 | p.run(); |
929 | 931 | } |
930 | 932 |
|
| 933 | + @Test |
| 934 | + public void testBoundedSourceUnsupportedInStreaming() throws Exception { |
| 935 | + testUnsupportedSource( |
| 936 | + AvroSource.readFromFileWithClass("foo", String.class), "Read.Bounded", true); |
| 937 | + } |
| 938 | + |
| 939 | + @Test |
| 940 | + public void testBigQueryIOSourceUnsupportedInStreaming() throws Exception { |
| 941 | + testUnsupportedSource( |
| 942 | + BigQueryIO.Read.from("project:bar.baz").withoutValidation(), "BigQueryIO.Read", true); |
| 943 | + } |
| 944 | + |
| 945 | + @Test |
| 946 | + public void testAvroIOSourceUnsupportedInStreaming() throws Exception { |
| 947 | + testUnsupportedSource(AvroIO.Read.from("foo"), "AvroIO.Read", true); |
| 948 | + } |
| 949 | + |
| 950 | + @Test |
| 951 | + public void testTextIOSourceUnsupportedInStreaming() throws Exception { |
| 952 | + testUnsupportedSource(TextIO.Read.from("foo"), "TextIO.Read", true); |
| 953 | + } |
| 954 | + |
| 955 | + @Test |
| 956 | + public void testReadBoundedSourceUnsupportedInStreaming() throws Exception { |
| 957 | + testUnsupportedSource(Read.from(AvroSource.from("/tmp/test")), "Read.Bounded", true); |
| 958 | + } |
| 959 | + |
931 | 960 | @Test |
932 | 961 | public void testReadUnboundedUnsupportedInBatch() throws Exception { |
933 | 962 | testUnsupportedSource(Read.from(new TestCountingSource(1)), "Read.Unbounded", false); |
|
0 commit comments