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

Commit 61468f0

Browse files
committed
attempt to fix IT tests
1 parent 74995fe commit 61468f0

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/it/ITMutableCredentialsTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
@Category(SerialIntegrationTest.class)
4242
@RunWith(JUnit4.class)
4343
public class ITMutableCredentialsTest extends ITAbstractSpannerTest {
44-
private static final String INVALID_KEY_FILE =
45-
ITMutableCredentialsTest.class.getResource("test-key.json").getPath();
44+
private static final String INVALID_KEY_RESOURCE =
45+
"/com/google/cloud/spanner/connection/test-key.json";
4646

4747
@Test
4848
public void testMutableCredentialsUpdateAuthorizationForRunningClient() throws IOException {
@@ -58,7 +58,8 @@ public void testMutableCredentialsUpdateAuthorizationForRunningClient() throws I
5858

5959
ServiceAccountCredentials validCredentials = (ServiceAccountCredentials) credentialsFromFile;
6060
ServiceAccountCredentials invalidCredentials;
61-
try (InputStream stream = Files.newInputStream(Paths.get(INVALID_KEY_FILE))) {
61+
try (InputStream stream = ITMutableCredentialsTest.class.getResourceAsStream(INVALID_KEY_RESOURCE)) {
62+
assertNotNull("Missing test resource: " + INVALID_KEY_RESOURCE, stream);
6263
invalidCredentials = ServiceAccountCredentials.fromStream(stream);
6364
}
6465

0 commit comments

Comments
 (0)