Skip to content

Commit 4c34953

Browse files
committed
Fix checkstyle, fix tests
1 parent bb564f0 commit 4c34953

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

sdks/java/testing/junit/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ dependencies {
3232
// Needed to resolve TestPipeline's JUnit 4 TestRule type and @Category at compile time,
3333
// but should not leak to consumers at runtime.
3434
provided library.java.junit
35+
permitUnusedDeclared(library.java.junit)
3536

3637
// JUnit 5 API needed to compile the extension; not packaged for consumers of core.
3738
provided library.java.jupiter_api

sdks/java/testing/junit/src/main/java/org/apache/beam/sdk/testing/TestPipelineExtension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import java.util.Collection;
2525
import org.apache.beam.sdk.options.ApplicationNameOptions;
2626
import org.apache.beam.sdk.options.PipelineOptions;
27-
import org.apache.beam.vendor.grpc.v1p69p0.com.google.common.collect.ImmutableList;
27+
import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList;
2828
import org.checkerframework.checker.nullness.qual.Nullable;
2929
import org.junit.jupiter.api.extension.AfterEachCallback;
3030
import org.junit.jupiter.api.extension.BeforeEachCallback;

sdks/java/testing/junit/src/test/java/org/apache/beam/sdk/testing/TestPipelineExtensionAdvancedTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import static org.junit.jupiter.api.Assertions.assertNotNull;
2121
import static org.junit.jupiter.api.Assertions.assertTrue;
2222

23+
import java.io.Serializable;
2324
import org.apache.beam.sdk.options.ApplicationNameOptions;
2425
import org.apache.beam.sdk.transforms.Create;
2526
import org.apache.beam.sdk.transforms.DoFn;
@@ -31,7 +32,7 @@
3132

3233
/** Advanced tests for {@link TestPipelineExtension} demonstrating comprehensive functionality. */
3334
@ExtendWith(TestPipelineExtension.class)
34-
public class TestPipelineExtensionAdvancedTest {
35+
public class TestPipelineExtensionAdvancedTest implements Serializable {
3536

3637
@Test
3738
public void testApplicationNameIsSet(TestPipeline pipeline) {
@@ -72,7 +73,7 @@ public void testWithValidatesRunnerCategory(TestPipeline pipeline) {
7273
@Test
7374
public void testPipelineInstancesAreIsolated(TestPipeline pipeline1) {
7475
// Each test method gets its own pipeline instance
75-
assertNotNull(pipeline1);
76+
pipeline1.enableAutoRunIfMissing(true);
7677
pipeline1.apply("Create", Create.of("test"));
7778
// Don't run the pipeline - test should still pass due to auto-run functionality
7879
}

0 commit comments

Comments
 (0)