shunping commented on code in PR #40279:
URL: https://github.com/apache/beam/pull/40279#discussion_r4139905198


##########
sdks/java/extensions/google-cloud-platform-core/src/test/java/org/apache/beam/sdk/extensions/gcp/util/GcsUtilIT.java:
##########
@@ -53,12 +93,778 @@
  * <p>This is a runnerless integration test, even though the Beam IT framework 
assumes one. Thus,
  * this test should only be run against single runner (such as DirectRunner).
  */
-@RunWith(JUnit4.class)
+@RunWith(Parameterized.class)
 @Category(UsesKms.class)
 public class GcsUtilIT {
+
+  private static final String READ_COUNTER_PREFIX = "it_read_bytes";
+  private static final String WRITE_COUNTER_PREFIX = "it_write_bytes";
+
+  @Parameters(name = "{0}")
+  public static Iterable<String> data() {
+    return Arrays.asList("use_gcsutil_v1", "use_gcsutil_v2");
+  }
+
+  @Parameter public String experiment;
+
+  private TestPipelineOptions options;
+  private GcsUtil gcsUtil;
+
+  @Before
+  public void setUp() {
+    options = 
TestPipeline.testingPipelineOptions().as(TestPipelineOptions.class);
+
+    // set the experimental flag.
+    ExperimentalOptions experimentalOptions = 
options.as(ExperimentalOptions.class);
+    experimentalOptions.setExperiments(Collections.singletonList(experiment));
+
+    GcsOptions gcsOptions = options.as(GcsOptions.class);
+    gcsUtil = gcsOptions.getGcsUtil();
+  }
+
+  /** Returns a bucket name unique to this test run, so concurrent runs don't 
collide. */
+  private static String randomBucketName() {
+    return "apache-beam-temp-bucket-" + UUID.randomUUID();

Review Comment:
   Ack. Created https://github.com/apache/beam/issues/40347 to track.



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