File tree Expand file tree Collapse file tree
sdks/java/core/src/test/java/org/apache/beam/sdk/transforms Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333import org .apache .beam .sdk .util .RowJson .RowJsonDeserializer .NullBehavior ;
3434import org .apache .beam .sdk .values .PCollection ;
3535import org .apache .beam .sdk .values .Row ;
36+ import org .apache .beam .sdk .values .TypeDescriptors ;
3637import org .apache .beam .vendor .guava .v32_1_2_jre .com .google .common .collect .ImmutableList ;
3738import org .junit .Rule ;
3839import org .junit .Test ;
@@ -285,13 +286,11 @@ public void testDownstreamExceptionIsNotReportedAsParseError() {
285286 .getResults ()
286287 .apply (
287288 "throwingDownstream" ,
288- ParDo .of (
289- new DoFn <Row , Row >() {
290- @ ProcessElement
291- public void processElement (ProcessContext context ) {
292- throw new RuntimeException ("downstream failure" );
293- }
294- }));
289+ MapElements .into (TypeDescriptors .rows ())
290+ .via (
291+ (Row row ) -> {
292+ throw new RuntimeException ("downstream failure" );
293+ }));
295294
296295 thrown .expect (RuntimeException .class );
297296 thrown .expectMessage ("downstream failure" );
You can’t perform that action at this time.
0 commit comments