idc101 commented on PR #35688:
URL: https://github.com/apache/beam/pull/35688#issuecomment-3347118918

   I am trying to use this in v2.68 but the validation is still looking for the 
junit 4 Rule:
   ```
   Is your TestPipeline declaration missing a @Rule annotation? Usage: @Rule 
public final transient TestPipeline pipeline = TestPipeline.create();
   java.lang.IllegalStateException: Is your TestPipeline declaration missing a 
@Rule annotation? Usage: @Rule public final transient TestPipeline pipeline = 
TestPipeline.create();
        at 
org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkState(Preconditions.java:512)
        at org.apache.beam.sdk.testing.TestPipeline.run(TestPipeline.java:414)
        at org.apache.beam.sdk.testing.TestPipeline.run(TestPipeline.java:366)
   ```
   
   Recreate with:
   ```
   import org.apache.beam.sdk.testing.NeedsRunner;
   import org.apache.beam.sdk.testing.TestPipeline;
   import org.apache.beam.sdk.testing.TestPipelineExtension;
   import org.junit.experimental.categories.Category;
   import org.junit.jupiter.api.Test;
   import org.junit.jupiter.api.extension.ExtendWith;
   
    @ExtendWith(TestPipelineExtension.class)
    public class DeDuplicateTest implements Serializable {
       @Test
       @Category(NeedsRunner.class)
       public void testBasicDeDuplicate(TestPipeline p) {
           p.run();
       }
   ```


-- 
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]

Reply via email to