Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

Commit 322d7c9

Browse files
committed
fix test
1 parent a8e0bd8 commit 322d7c9

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateSchemaBundleRequestTest.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
import com.google.cloud.bigtable.admin.v2.internal.NameUtil;
2222
import com.google.protobuf.ByteString;
2323
import java.io.IOException;
24+
import java.net.URISyntaxException;
25+
import java.net.URL;
26+
import java.nio.file.Paths;
2427
import org.junit.Test;
2528
import org.junit.runner.RunWith;
2629
import org.junit.runners.JUnit4;
@@ -37,10 +40,13 @@ public class CreateSchemaBundleRequestTest {
3740
private static final String TEST_UPDATED_PROTO_SCHEMA_BUNDLE = "updated_proto_schema_bundle.pb";
3841

3942
@Test
40-
public void testToProto() throws IOException {
43+
public void testToProto() throws IOException, URISyntaxException {
44+
ClassLoader cl = Thread.currentThread().getContextClassLoader();
45+
URL protoSchema = cl.getResource(TEST_PROTO_SCHEMA_BUNDLE);
46+
4147
CreateSchemaBundleRequest request =
4248
CreateSchemaBundleRequest.of(TABLE_ID, SCHEMA_BUNDLE_ID)
43-
.setProtoSchema(TEST_PROTO_SCHEMA_BUNDLE);
49+
.setProtoSchema(Paths.get(protoSchema.toURI()).toAbsolutePath().toString());
4450

4551
com.google.bigtable.admin.v2.CreateSchemaBundleRequest requestProto =
4652
com.google.bigtable.admin.v2.CreateSchemaBundleRequest.newBuilder()

0 commit comments

Comments
 (0)