Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove testRuntimeMigration configuration for test-utils dependencies #31713

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sdks/java/io/bigquery-io-perf-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ ext.summary = "Performance tests for Google BigQuery IO sources and sinks"
dependencies {
testImplementation library.java.google_api_services_bigquery
testImplementation project(path: ":sdks:java:core", configuration: "shadowTest")
testImplementation project(path: ":sdks:java:testing:test-utils", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:testing:test-utils")
testImplementation project(path: ":sdks:java:extensions:google-cloud-platform-core", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:testing:test-utils", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:testing:test-utils")
testImplementation project(path: ":sdks:java:io:common")
testImplementation project(path: ":sdks:java:io:google-cloud-platform", configuration: "testRuntimeMigration")
testImplementation project(":sdks:java:io:synthetic")
Expand Down
2 changes: 1 addition & 1 deletion sdks/java/io/cdap/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ dependencies {
testImplementation library.java.postgres
testImplementation library.java.testcontainers_postgresql
testImplementation project(path: ":sdks:java:extensions:avro", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:testing:test-utils", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:testing:test-utils")
testImplementation project(path: ":runners:direct-java", configuration: "shadow")
testImplementation project(path: ":sdks:java:io:common")
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
import static org.apache.beam.sdk.io.common.TestRow.getExpectedHashForRowCount;
import static org.junit.Assert.assertNotEquals;

import com.google.cloud.Timestamp;
import io.cdap.plugin.common.Constants;
import java.sql.SQLException;
import java.time.Instant;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
Expand Down Expand Up @@ -238,7 +238,7 @@ private static void deleteTable() throws SQLException {

private void collectAndPublishMetrics(PipelineResult writeResult, PipelineResult readResult) {
String uuid = UUID.randomUUID().toString();
String timestamp = Timestamp.now().toString();
String timestamp = Instant.now().toString();

Set<Function<MetricsReader, NamedTestResult>> readSuppliers = getReadSuppliers(uuid, timestamp);
Set<Function<MetricsReader, NamedTestResult>> writeSuppliers =
Expand Down
2 changes: 1 addition & 1 deletion sdks/java/io/file-based-io-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies {
testImplementation project(path: ":sdks:java:io:common")
testImplementation project(path: ":sdks:java:io:xml", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:io:parquet", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:testing:test-utils", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:testing:test-utils")
testImplementation library.java.jaxb_api
testImplementation library.java.junit
testImplementation library.java.hadoop_client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import static org.apache.beam.sdk.io.common.FileBasedIOITHelper.readFileBasedIOITPipelineOptions;
import static org.junit.Assert.assertNotEquals;

import com.google.cloud.Timestamp;
import java.time.Instant;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
Expand Down Expand Up @@ -167,7 +167,7 @@ public void writeThenReadAll() {

private void collectAndPublishMetrics(PipelineResult result) {
String uuid = UUID.randomUUID().toString();
String timestamp = Timestamp.now().toString();
String timestamp = Instant.now().toString();

Set<Function<MetricsReader, NamedTestResult>> metricSuppliers =
fillMetricSuppliers(uuid, timestamp);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import static org.apache.beam.sdk.values.TypeDescriptors.strings;
import static org.junit.Assert.assertNotEquals;

import com.google.cloud.Timestamp;
import java.time.Instant;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
Expand Down Expand Up @@ -173,7 +173,7 @@ record -> String.valueOf(record.get("row"))))

private void collectAndPublishMetrics(PipelineResult result) {
String uuid = UUID.randomUUID().toString();
String timestamp = Timestamp.now().toString();
String timestamp = Instant.now().toString();
Set<Function<MetricsReader, NamedTestResult>> metricSuppliers =
fillMetricSuppliers(uuid, timestamp);
final IOITMetrics metrics =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import static org.apache.beam.sdk.io.common.FileBasedIOITHelper.readFileBasedIOITPipelineOptions;
import static org.junit.Assert.assertNotEquals;

import com.google.cloud.Timestamp;
import java.time.Instant;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
Expand Down Expand Up @@ -160,13 +160,13 @@ public void writeThenReadAll() {

private void collectAndPublishMetrics(PipelineResult result) {
String uuid = UUID.randomUUID().toString();
Timestamp timestamp = Timestamp.now();
String timestamp = Instant.now().toString();

Set<Function<MetricsReader, NamedTestResult>> metricSuppliers =
fillMetricSuppliers(uuid, timestamp.toString());
fillMetricSuppliers(uuid, timestamp);

final IOITMetrics metrics =
new IOITMetrics(metricSuppliers, result, FILEIOIT_NAMESPACE, uuid, timestamp.toString());
new IOITMetrics(metricSuppliers, result, FILEIOIT_NAMESPACE, uuid, timestamp);
metrics.publishToInflux(settings);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import static org.apache.beam.sdk.io.common.FileBasedIOITHelper.readFileBasedIOITPipelineOptions;
import static org.junit.Assert.assertNotEquals;

import com.google.cloud.Timestamp;
import java.nio.charset.StandardCharsets;
import java.time.Instant;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
Expand Down Expand Up @@ -172,7 +172,7 @@ public void writeThenReadAll() {
private void collectAndPublishMetrics(
final PipelineResult writeResults, final PipelineResult readResults) {
final String uuid = UUID.randomUUID().toString();
final String timestamp = Timestamp.now().toString();
final String timestamp = Instant.now().toString();
final Set<NamedTestResult> results = new HashSet<>();

results.add(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
import static org.apache.beam.sdk.io.common.IOITHelper.readIOTestPipelineOptions;
import static org.junit.Assert.assertNotEquals;

import com.google.cloud.Timestamp;
import java.io.Serializable;
import java.nio.charset.Charset;
import java.time.Instant;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
Expand Down Expand Up @@ -180,7 +180,7 @@ public void writeThenReadAll() {

private void collectAndPublishResults(PipelineResult result) {
String uuid = UUID.randomUUID().toString();
String timestamp = Timestamp.now().toString();
String timestamp = Instant.now().toString();

Set<Function<MetricsReader, NamedTestResult>> metricSuppliers =
fillMetricSuppliers(uuid, timestamp);
Expand Down
9 changes: 3 additions & 6 deletions sdks/java/io/google-cloud-platform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ ext.summary = "IO library to read and write Google Cloud Platform systems from B

dependencies {
implementation enforcedPlatform(library.java.google_cloud_platform_libraries_bom)
permitUnusedDeclared enforcedPlatform(library.java.google_cloud_platform_libraries_bom)
implementation project(path: ":model:pipeline", configuration: "shadow")
implementation project(":runners:core-java")
implementation project(path: ":sdks:java:core", configuration: "shadow")
Expand Down Expand Up @@ -72,7 +71,6 @@ dependencies {
// users receive newer google-cloud-bigtable. Beam doesn't directly use this
// artifact.
implementation library.java.google_cloud_bigtable
permitUnusedDeclared library.java.google_cloud_bigtable
implementation library.java.google_cloud_core
implementation(library.java.google_cloud_core_grpc) {
exclude group: 'io.grpc', module: 'grpc-core' // Use Beam's version
Expand All @@ -96,7 +94,6 @@ dependencies {
implementation library.java.grpc_api
implementation library.java.grpc_auth
implementation library.java.grpc_core
permitUnusedDeclared library.java.grpc_core // BEAM-11761
implementation library.java.grpc_census
permitUnusedDeclared library.java.grpc_census // BEAM-11761
implementation library.java.grpc_context
Expand All @@ -117,7 +114,6 @@ dependencies {
implementation library.java.guava
implementation library.java.http_client
implementation library.java.hamcrest
permitUnusedDeclared library.java.hamcrest // Needed for PipelineOptionRegistrar auto-service that registered TestPipelineOptions interfaces
implementation library.java.http_core
implementation library.java.jackson_core
implementation library.java.jackson_databind
Expand All @@ -135,7 +131,6 @@ dependencies {
implementation library.java.proto_google_cloud_pubsub_v1
implementation library.java.proto_google_cloud_pubsublite_v1
implementation library.java.proto_google_cloud_spanner_admin_database_v1
permitUnusedDeclared library.java.proto_google_cloud_spanner_admin_database_v1 // BEAM-11761
implementation library.java.proto_google_cloud_spanner_v1
implementation library.java.proto_google_common_protos
implementation library.java.protobuf_java
Expand Down Expand Up @@ -165,7 +160,9 @@ dependencies {
testImplementation project(path: ":sdks:java:extensions:protobuf", configuration: "testRuntimeMigration")
testImplementation project(path: ":runners:direct-java", configuration: "shadow")
testImplementation project(path: ":sdks:java:io:common")
testImplementation project(path: ":sdks:java:testing:test-utils", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:testing:test-utils")
testImplementation library.java.commons_math3
testImplementation library.java.google_cloud_bigquery
testImplementation library.java.mockito_core
testImplementation library.java.powermock
testImplementation library.java.powermock_mockito
Expand Down
2 changes: 1 addition & 1 deletion sdks/java/io/hadoop-format/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ dependencies {
testImplementation project(path: ":sdks:java:core", configuration: "shadowTest")
testImplementation project(path: ":sdks:java:extensions:avro", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:io:common")
testImplementation project(path: ":sdks:java:testing:test-utils", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:testing:test-utils")
testImplementation project(":sdks:java:io:jdbc")
testImplementation "org.elasticsearch.plugin:transport-netty4-client:$elastic_search_version"
testImplementation library.java.testcontainers_elasticsearch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import static org.apache.beam.sdk.io.common.TestRow.getExpectedHashForRowCount;
import static org.junit.Assert.assertNotEquals;

import com.google.cloud.Timestamp;
import java.sql.SQLException;
import java.time.Instant;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
Expand Down Expand Up @@ -236,7 +236,7 @@ public void writeAndReadUsingHadoopFormat() {

private void collectAndPublishMetrics(PipelineResult writeResult, PipelineResult readResult) {
String uuid = UUID.randomUUID().toString();
String timestamp = Timestamp.now().toString();
String timestamp = Instant.now().toString();

Set<Function<MetricsReader, NamedTestResult>> readSuppliers = getReadSuppliers(uuid, timestamp);
Set<Function<MetricsReader, NamedTestResult>> writeSuppliers =
Expand Down
2 changes: 1 addition & 1 deletion sdks/java/io/jdbc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies {
testImplementation project(path: ":sdks:java:core", configuration: "shadowTest")
testImplementation project(path: ":sdks:java:extensions:avro", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:io:common")
testImplementation project(path: ":sdks:java:testing:test-utils", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:testing:test-utils")
testImplementation library.java.junit
testImplementation library.java.slf4j_api
testImplementation library.java.postgres
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.MoreObjects.firstNonNull;
import static org.junit.Assert.assertNotEquals;

import com.google.cloud.Timestamp;
import java.sql.SQLException;
import java.util.HashSet;
import java.util.List;
Expand Down Expand Up @@ -149,7 +148,7 @@ public void testWriteThenRead() throws SQLException {

private void gatherAndPublishMetrics(PipelineResult writeResult, PipelineResult readResult) {
String uuid = UUID.randomUUID().toString();
String timestamp = Timestamp.now().toString();
String timestamp = Instant.now().toString();

Set<Function<MetricsReader, NamedTestResult>> metricSuppliers =
getWriteMetricSuppliers(uuid, timestamp);
Expand Down
2 changes: 1 addition & 1 deletion sdks/java/io/jms/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dependencies {
testImplementation library.java.mockito_inline
testImplementation library.java.qpid_jms_client
testImplementation project(path: ":sdks:java:io:common")
testImplementation project(path: ":sdks:java:testing:test-utils", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:testing:test-utils")
testRuntimeOnly library.java.slf4j_jdk14
testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow")
}
2 changes: 1 addition & 1 deletion sdks/java/io/kafka/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ dependencies {
testImplementation project(path: ":sdks:java:extensions:avro", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:extensions:protobuf", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:io:common")
testImplementation project(path: ":sdks:java:testing:test-utils", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:testing:test-utils")
// For testing Cross-language transforms
testImplementation library.java.avro
testImplementation library.java.junit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNull;

import com.google.cloud.Timestamp;
import java.io.IOException;
import java.time.Instant;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
Expand Down Expand Up @@ -134,7 +134,7 @@ public class KafkaIOIT {

private static final String TEST_ID = UUID.randomUUID().toString();

private static final String TIMESTAMP = Timestamp.now().toString();
private static final String TIMESTAMP = Instant.now().toString();

private static final Logger LOG = LoggerFactory.getLogger(KafkaIOIT.class);

Expand Down
2 changes: 1 addition & 1 deletion sdks/java/io/mongodb/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies {
implementation library.java.vendored_guava_32_1_2_jre
testImplementation library.java.junit
testImplementation project(path: ":sdks:java:io:common")
testImplementation project(path: ":sdks:java:testing:test-utils", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:testing:test-utils")
testImplementation "de.flapdoodle.embed:de.flapdoodle.embed.mongo:3.0.0"
testImplementation "de.flapdoodle.embed:de.flapdoodle.embed.process:3.0.0"
testRuntimeOnly library.java.slf4j_jdk14
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
import static org.apache.beam.sdk.io.common.IOITHelper.getHashForRecordCount;
import static org.junit.Assert.assertNotEquals;

import com.google.cloud.Timestamp;
import com.mongodb.client.MongoClient;
import com.mongodb.client.MongoClients;
import java.time.Instant;
import java.util.Date;
import java.util.HashSet;
import java.util.Map;
Expand Down Expand Up @@ -237,7 +237,7 @@ private double getCollectionSizeInBytes(final String collectionName) {

private void collectAndPublishMetrics(PipelineResult writeResult, PipelineResult readResult) {
String uuid = UUID.randomUUID().toString();
String timestamp = Timestamp.now().toString();
String timestamp = Instant.now().toString();

Set<Function<MetricsReader, NamedTestResult>> readSuppliers = getReadSuppliers(uuid, timestamp);
Set<Function<MetricsReader, NamedTestResult>> writeSuppliers =
Expand Down
2 changes: 1 addition & 1 deletion sdks/java/io/neo4j/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies {
testImplementation library.java.junit
testImplementation library.java.hamcrest
testImplementation project(path: ":sdks:java:io:common")
testImplementation project(path: ":sdks:java:testing:test-utils", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:testing:test-utils")
testImplementation "org.testcontainers:neo4j:1.16.2"
testRuntimeOnly library.java.slf4j_jdk14
testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow")
Expand Down
3 changes: 2 additions & 1 deletion sdks/java/io/singlestore/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ dependencies {
testImplementation library.java.dbcp2
testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow")
testImplementation library.java.slf4j_api
testImplementation project(path: ":sdks:java:testing:test-utils", configuration: "testRuntimeMigration")
testImplementation library.java.mockito_core
testImplementation project(path: ":sdks:java:testing:test-utils")
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import static org.apache.beam.sdk.io.common.IOITHelper.readIOTestPipelineOptions;
import static org.junit.Assert.assertEquals;

import com.google.cloud.Timestamp;
import com.singlestore.jdbc.SingleStoreDataSource;
import java.time.Instant;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
Expand Down Expand Up @@ -134,7 +134,7 @@ private void gatherAndPublishMetrics(
PipelineResult readResult,
PipelineResult readResultWithPartitions) {
String uuid = UUID.randomUUID().toString();
String timestamp = Timestamp.now().toString();
String timestamp = Instant.now().toString();

IOITMetrics writeMetrics =
new IOITMetrics(
Expand Down
2 changes: 1 addition & 1 deletion sdks/java/io/snowflake/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies {
testImplementation project(path: ":sdks:java:core", configuration: "shadowTest")
testImplementation project(path: ":sdks:java:extensions:avro", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:io:common")
testImplementation project(path: ":sdks:java:testing:test-utils", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:testing:test-utils")
testImplementation 'com.google.cloud:google-cloud-storage:1.102.0'
testImplementation library.java.avro
testImplementation library.java.junit
Expand Down
2 changes: 1 addition & 1 deletion sdks/java/io/solace/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ dependencies {

testImplementation library.java.junit
testImplementation project(path: ":sdks:java:io:common")
testImplementation project(path: ":sdks:java:testing:test-utils", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:testing:test-utils")
testRuntimeOnly library.java.slf4j_jdk14
testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow")
}
5 changes: 3 additions & 2 deletions sdks/java/io/sparkreceiver/2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ dependencies {
compileOnly "org.scala-lang:scala-library:2.11.12"
testImplementation library.java.junit
testImplementation library.java.testcontainers_rabbitmq
testImplementation project(path: ":runners:direct-java", configuration: "shadow")
testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow")
testRuntimeOnly library.java.slf4j_simple
testImplementation project(":sdks:java:io:synthetic")
testImplementation project(path: ":sdks:java:io:common")
testImplementation project(path: ":sdks:java:testing:test-utils", configuration: "testRuntimeMigration")
testImplementation project(path: ":sdks:java:testing:test-utils")
testImplementation "com.rabbitmq:amqp-client:5.16.0"
}
Loading
Loading