This repository was archived by the owner on Apr 7, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/it Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929import com .google .spanner .admin .database .v1 .DatabaseName ;
3030import java .io .IOException ;
3131import java .io .InputStream ;
32- import java .nio .file .Files ;
33- import java .nio .file .Paths ;
3432import java .util .ArrayList ;
3533import java .util .List ;
3634import org .junit .Test ;
@@ -51,7 +49,8 @@ public class ITMutableCredentialsTest extends ITAbstractSpannerTest {
5149 public void testMutableCredentialsUpdateAuthorizationForRunningClient () throws IOException {
5250
5351 GoogleCredentials credentialsFromFile ;
54- try (InputStream stream = Files .newInputStream (Paths .get (VALID_KEY_RESOURCE ))) {
52+ try (InputStream stream = ITMutableCredentialsTest .class .getResourceAsStream (VALID_KEY_RESOURCE )) {
53+ assertNotNull ("Missing test resource: " + VALID_KEY_RESOURCE , stream );
5554 credentialsFromFile = GoogleCredentials .fromStream (stream );
5655 }
5756 assumeTrue (
@@ -60,7 +59,7 @@ public void testMutableCredentialsUpdateAuthorizationForRunningClient() throws I
6059
6160 ServiceAccountCredentials validCredentials = (ServiceAccountCredentials ) credentialsFromFile ;
6261 ServiceAccountCredentials invalidCredentials ;
63- try (InputStream stream = Files . newInputStream ( Paths . get (INVALID_KEY_RESOURCE ) )) {
62+ try (InputStream stream = ITMutableCredentialsTest . class . getResourceAsStream (INVALID_KEY_RESOURCE )) {
6463 assertNotNull ("Missing test resource: " + INVALID_KEY_RESOURCE , stream );
6564 invalidCredentials = ServiceAccountCredentials .fromStream (stream );
6665 }
You can’t perform that action at this time.
0 commit comments