byronellis commented on code in PR #24974: URL: https://github.com/apache/beam/pull/24974#discussion_r1070293679
########## sdks/java/core/src/test/java/org/apache/beam/sdk/io/AvroSchemaTransformsTest.java: ########## @@ -0,0 +1,91 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.beam.sdk.io; + +import java.io.File; +import java.util.Arrays; +import java.util.List; +import org.apache.beam.sdk.coders.RowCoder; +import org.apache.beam.sdk.schemas.Schema; +import org.apache.beam.sdk.testing.NeedsRunner; +import org.apache.beam.sdk.testing.PAssert; +import org.apache.beam.sdk.testing.TestPipeline; +import org.apache.beam.sdk.transforms.Create; +import org.apache.beam.sdk.values.PCollection; +import org.apache.beam.sdk.values.PCollectionRowTuple; +import org.apache.beam.sdk.values.Row; +import org.junit.Ignore; +import org.junit.Rule; +import org.junit.Test; +import org.junit.experimental.categories.Category; +import org.junit.rules.TemporaryFolder; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class AvroSchemaTransformsTest { + @Rule public TestPipeline writePipeline = TestPipeline.create(); + @Rule public TestPipeline readPipeline = TestPipeline.create(); + @Rule public TemporaryFolder tempFolder = new TemporaryFolder(); + + private static final Schema SCHEMA = + Schema.builder().addInt64Field("age").addStringField("age_str").build(); + + private Row createRow(long l) { + return Row.withSchema(SCHEMA).addValues(l, Long.valueOf(l).toString()).build(); + } + + @Test + @Ignore + @Category({NeedsRunner.class}) + public void testWriteAndReadTable() { Review Comment: If this were the AvroIO test I would agree with you (and it does, though it actually tests read and write in a way identical to this). This is more an integration test than it is a unit test as far as I can tell. As mentioned in the initial pull request this is really a port of the existing SchemaIO so I would prefer to keep the test coverage largely the same if we can to avoid changing semantics (we can do that at some later date). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
