Skip to content

Commit 3e82960

Browse files
fix(java): add additional configurations to fix native image tests (#1859)
* fix(java): add configurations to fix native image tests * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent b3b5398 commit 3e82960

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@
125125
import com.google.common.io.BaseEncoding;
126126
import com.google.gson.JsonObject;
127127
import java.io.IOException;
128+
import java.io.InputStream;
128129
import java.math.BigDecimal;
129130
import java.nio.ByteBuffer;
130131
import java.nio.charset.StandardCharsets;
131-
import java.nio.file.FileSystems;
132132
import java.time.Instant;
133133
import java.time.Period;
134134
import java.util.ArrayList;
@@ -472,9 +472,10 @@ public static void beforeClass() throws InterruptedException, IOException {
472472
.setContentType("application/json")
473473
.build(),
474474
JSON_CONTENT_SIMPLE.getBytes(StandardCharsets.UTF_8));
475+
InputStream stream =
476+
ITBigQueryTest.class.getClassLoader().getResourceAsStream("QueryTestData.csv");
475477
storage.createFrom(
476-
BlobInfo.newBuilder(BUCKET, LOAD_FILE_LARGE).setContentType("text/plain").build(),
477-
FileSystems.getDefault().getPath("src/test/resources", "QueryTestData.csv"));
478+
BlobInfo.newBuilder(BUCKET, LOAD_FILE_LARGE).setContentType("text/plain").build(), stream);
478479
DatasetInfo info =
479480
DatasetInfo.newBuilder(DATASET).setDescription(DESCRIPTION).setLabels(LABELS).build();
480481
bigquery.create(info);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[
2+
{
3+
"name":"java.lang.Object",
4+
"methods":[{"name":"<init>","parameterTypes":[] }]
5+
},
6+
{
7+
"name":"com.google.api.client.googleapis.json.GoogleJsonError",
8+
"methods":[
9+
{"name":"<init>","parameterTypes":[] }]
10+
},
11+
{
12+
"name":"com.google.api.client.googleapis.json.GoogleJsonError$Details",
13+
"methods":[{"name":"<init>","parameterTypes":[] }]
14+
},
15+
{
16+
"name":"com.google.api.client.googleapis.json.GoogleJsonError$ErrorInfo",
17+
"methods":[{"name":"<init>","parameterTypes":[]}]
18+
},
19+
{
20+
"name":"java.util.HashMap",
21+
"methods":[{"name":"<init>","parameterTypes":[] }]
22+
}
23+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"resources":[{"pattern": ".*.csv"}]
3+
}

0 commit comments

Comments
 (0)