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

fix(java): add additional configurations to fix native image tests #1859

Merged
merged 2 commits into from
Feb 14, 2022
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ implementation 'com.google.cloud:google-cloud-bigquery'
If you are using Gradle without BOM, add this to your dependencies

```Groovy
implementation 'com.google.cloud:google-cloud-bigquery:2.8.0'
implementation 'com.google.cloud:google-cloud-bigquery:2.9.0'
```

If you are using SBT, add this to your dependencies

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "2.8.0"
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "2.9.0"
```

## Authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@
import com.google.common.io.BaseEncoding;
import com.google.gson.JsonObject;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileSystems;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Collection;
Expand Down Expand Up @@ -470,9 +470,10 @@ public static void beforeClass() throws InterruptedException, IOException {
.setContentType("application/json")
.build(),
JSON_CONTENT_SIMPLE.getBytes(StandardCharsets.UTF_8));
InputStream stream =
ITBigQueryTest.class.getClassLoader().getResourceAsStream("QueryTestData.csv");
storage.createFrom(
BlobInfo.newBuilder(BUCKET, LOAD_FILE_LARGE).setContentType("text/plain").build(),
FileSystems.getDefault().getPath("src/test/resources", "QueryTestData.csv"));
BlobInfo.newBuilder(BUCKET, LOAD_FILE_LARGE).setContentType("text/plain").build(), stream);
DatasetInfo info =
DatasetInfo.newBuilder(DATASET).setDescription(DESCRIPTION).setLabels(LABELS).build();
bigquery.create(info);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
{
"name":"java.lang.Object",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.google.api.client.googleapis.json.GoogleJsonError",
"methods":[
{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.google.api.client.googleapis.json.GoogleJsonError$Details",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.google.api.client.googleapis.json.GoogleJsonError$ErrorInfo",
"methods":[{"name":"<init>","parameterTypes":[]}]
},
{
"name":"java.util.HashMap",
"methods":[{"name":"<init>","parameterTypes":[] }]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"resources":[{"pattern": ".*.csv"}]
}