You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ma...@apache.org on 2019/09/11 18:26:04 UTC

[beam] branch revert-9454-dataflow-schema-test created (now d591c37)

This is an automated email from the ASF dual-hosted git repository.

markliu pushed a change to branch revert-9454-dataflow-schema-test
in repository https://gitbox.apache.org/repos/asf/beam.git.


      at d591c37  Revert "Merge pull request #9454: [BEAM-8111] Add ValidatesRunner test to AvroSchemaTest"

This branch includes the following new commits:

     new d591c37  Revert "Merge pull request #9454: [BEAM-8111] Add ValidatesRunner test to AvroSchemaTest"

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[beam] 01/01: Revert "Merge pull request #9454: [BEAM-8111] Add ValidatesRunner test to AvroSchemaTest"

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markliu pushed a commit to branch revert-9454-dataflow-schema-test
in repository https://gitbox.apache.org/repos/asf/beam.git

commit d591c37d185095f29380c361033e687392fc225d
Author: Mark Liu <ma...@apache.org>
AuthorDate: Wed Sep 11 11:25:37 2019 -0700

    Revert "Merge pull request #9454: [BEAM-8111] Add ValidatesRunner test to AvroSchemaTest"
    
    This reverts commit 58a12b617f15d420268e50d6c338800df11b4b21.
---
 .../apache/beam/sdk/schemas/AvroSchemaTest.java    | 29 ----------------------
 1 file changed, 29 deletions(-)

diff --git a/sdks/java/core/src/test/java/org/apache/beam/sdk/schemas/AvroSchemaTest.java b/sdks/java/core/src/test/java/org/apache/beam/sdk/schemas/AvroSchemaTest.java
index f107332..4ffad67 100644
--- a/sdks/java/core/src/test/java/org/apache/beam/sdk/schemas/AvroSchemaTest.java
+++ b/sdks/java/core/src/test/java/org/apache/beam/sdk/schemas/AvroSchemaTest.java
@@ -32,17 +32,9 @@ import org.apache.avro.reflect.AvroName;
 import org.apache.avro.reflect.AvroSchema;
 import org.apache.avro.util.Utf8;
 import org.apache.beam.sdk.schemas.LogicalTypes.FixedBytes;
-import org.apache.beam.sdk.schemas.Schema.Field;
 import org.apache.beam.sdk.schemas.Schema.FieldType;
-import org.apache.beam.sdk.schemas.transforms.Group;
 import org.apache.beam.sdk.schemas.utils.AvroUtils;
-import org.apache.beam.sdk.testing.PAssert;
-import org.apache.beam.sdk.testing.TestPipeline;
-import org.apache.beam.sdk.testing.ValidatesRunner;
-import org.apache.beam.sdk.transforms.Create;
 import org.apache.beam.sdk.transforms.SerializableFunction;
-import org.apache.beam.sdk.values.KV;
-import org.apache.beam.sdk.values.PCollection;
 import org.apache.beam.sdk.values.Row;
 import org.apache.beam.sdk.values.TypeDescriptor;
 import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
@@ -51,9 +43,7 @@ import org.joda.time.DateTime;
 import org.joda.time.DateTimeZone;
 import org.joda.time.Days;
 import org.joda.time.LocalDate;
-import org.junit.Rule;
 import org.junit.Test;
-import org.junit.experimental.categories.Category;
 
 /** Tests for AVRO schema classes. */
 public class AvroSchemaTest {
@@ -416,23 +406,4 @@ public class AvroSchemaTest {
         new AvroRecordSchema().fromRowFunction(TypeDescriptor.of(AvroPojo.class));
     assertEquals(AVRO_POJO, fromRow.apply(ROW_FOR_POJO));
   }
-
-  @Rule public final transient TestPipeline pipeline = TestPipeline.create();
-
-  @Test
-  @Category(ValidatesRunner.class)
-  public void testAvroPipelineGroupBy() {
-    PCollection<Row> input = pipeline.apply(Create.of(ROW_FOR_POJO)).setRowSchema(POJO_SCHEMA);
-
-    PCollection<KV<Row, Iterable<Row>>> output = input.apply(Group.byFieldNames("string"));
-    PAssert.that(output)
-        .containsInAnyOrder(
-            KV.of(
-                Row.withSchema(Schema.of(Field.of("string", FieldType.STRING)))
-                    .addValue("mystring")
-                    .build(),
-                ImmutableList.of(ROW_FOR_POJO)));
-
-    pipeline.run();
-  }
 }