Skip to content
Draft
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
3 changes: 1 addition & 2 deletions java-bigquery/.cloudbuild/scripts/jdbc-nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ source .kokoro/common.sh
install_modules java-bigquery

cd ${ROOT_FOLDER}/java-bigquery/google-cloud-bigquery-jdbc
make integration-test test=ITBigQueryJDBCTest
make integration-test test=ITNightlyBigQueryTest
make integration-test test=ITNightlyTests
2 changes: 1 addition & 1 deletion java-bigquery/.cloudbuild/scripts/jdbc-presubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ source .kokoro/common.sh
install_modules java-bigquery

cd ${ROOT_FOLDER}/java-bigquery/google-cloud-bigquery-jdbc
make integration-test test=ITBigQueryJDBCTest
make integration-test test=ITPresubmitTests
137 changes: 137 additions & 0 deletions java-bigquery/google-cloud-bigquery-jdbc/pom-it.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery-jdbc-it-standalone</artifactId>
<!-- Use same version as the main project, or generic 1.0-SNAPSHOT -->
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>BigQuery JDBC Standalone IT Tests</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>

<dependencies>
<!-- Include the test classes from the main project -->
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery-jdbc</artifactId>
<version>0.4.1-SNAPSHOT</version>
<type>test-jar</type>
<scope>compile</scope>
</dependency>

<!-- Console launcher to run tests from command line without maven -->
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-console-standalone</artifactId>
<version>1.11.4</version>
<scope>compile</scope>
</dependency>

<!-- Test dependencies are usually test scope, we make them compile here so they get shaded into the jar -->
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<version>1.4.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.11.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.11.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.11.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.11.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>4.11.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite-api</artifactId>
<version>1.11.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite-engine</artifactId>
<version>1.11.4</version>
<scope>compile</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<!--
We exclude the main bigquery-jdbc framework classes.
This jar should ONLY contain tests and their dependencies (Junit, Mockito, Truth),
plus the test classes themselves. When running, the ACTUAL JDBC driver jar
will be placed on the classpath.
-->
<artifactSet>
<excludes>
<exclude>com.google.cloud:google-cloud-bigquery-jdbc:jar</exclude>
<exclude>com.google.cloud:google-cloud-bigquery</exclude>
<exclude>com.google.cloud:google-cloud-bigquerystorage</exclude>
<exclude>io.grpc:*</exclude>
<exclude>com.google.protobuf:*</exclude>
</excludes>
</artifactSet>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.junit.platform.console.ConsoleLauncher</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
70 changes: 61 additions & 9 deletions java-bigquery/google-cloud-bigquery-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<version>0.4.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigquery-jdbc:current} -->
<packaging>jar</packaging>
<name>BigQuery JDBC</name>
<url>https://github.com/googleapis/google-cloud-java-jdbc</url>
<url>https://github.com/googleapis/google-cloud-java</url>
<description>JDBC for BigQuery</description>

<properties>
Expand Down Expand Up @@ -61,6 +61,13 @@
<JDBC_TESTS>true</JDBC_TESTS>
</systemPropertyVariables>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit-platform</artifactId>
<version>3.5.2</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
Expand All @@ -78,9 +85,21 @@
<ignoredUsedUndeclaredDependency>io.grpc:*</ignoredUsedUndeclaredDependency>
</ignoredUsedUndeclaredDependencies>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.2</version> <!-- Use the latest version -->
<executions>
Expand Down Expand Up @@ -179,6 +198,7 @@
</exclusions>
</dependency>

<!-- Transitive Dependencies -->
<dependency>
<groupId>com.google.api</groupId>
<artifactId>api-common</artifactId>
Expand Down Expand Up @@ -268,22 +288,47 @@
<artifactId>httpcore5</artifactId>
</dependency>

<!-- Test Dependencies -->
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<version>1.1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite-api</artifactId>
<version>1.11.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite-engine</artifactId>
<version>1.11.4</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -310,6 +355,13 @@
<argLine>--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<argLine>--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
import org.apache.arrow.vector.util.JsonStringArrayList;
import org.apache.arrow.vector.util.JsonStringHashMap;
import org.apache.arrow.vector.util.Text;
import org.junit.Rule;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

public class ArrowFormatTypeBigQueryCoercionUtilityTest {

@Rule public final TimeZoneRule timeZoneRule = new TimeZoneRule("UTC");
@RegisterExtension public final TimeZoneRule timeZoneRule = new TimeZoneRule("UTC");

private static final Range RANGE_DATE =
Range.newBuilder()
Expand Down
Loading
Loading