File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 3333import com .google .api .gax .retrying .RetrySettings ;
3434import com .google .api .gax .rpc .ServerStream ;
3535import com .google .api .gax .rpc .UnauthenticatedException ;
36- import com .google .auth .oauth2 .GoogleCredentials ;
36+ import com .google .auth .oauth2 .ServiceAccountCredentials ;
3737import com .google .cloud .RetryOption ;
3838import com .google .cloud .ServiceOptions ;
3939import com .google .cloud .bigquery .BigQuery ;
@@ -1852,10 +1852,10 @@ private Job RunQueryJobAndExpectSuccess(QueryJobConfiguration configuration)
18521852 return completedJob ;
18531853 }
18541854
1855- static GoogleCredentials loadCredentials (String credentialFile ) {
1855+ static ServiceAccountCredentials loadCredentials (String credentialFile ) {
18561856 try {
18571857 InputStream keyStream = new ByteArrayInputStream (credentialFile .getBytes ());
1858- return GoogleCredentials .fromStream (keyStream );
1858+ return ServiceAccountCredentials .fromStream (keyStream );
18591859 } catch (IOException e ) {
18601860 fail ("Couldn't create fake JSON credentials." );
18611861 }
Original file line number Diff line number Diff line change 2727import com .google .api .gax .core .FixedCredentialsProvider ;
2828import com .google .api .gax .rpc .ServerStream ;
2929import com .google .api .gax .rpc .UnauthenticatedException ;
30- import com .google .auth .oauth2 .GoogleCredentials ;
30+ import com .google .auth .oauth2 .ServiceAccountCredentials ;
3131import com .google .cloud .RetryOption ;
3232import com .google .cloud .ServiceOptions ;
3333import com .google .cloud .bigquery .BigQuery ;
@@ -1315,10 +1315,10 @@ private Job RunQueryJobAndExpectSuccess(QueryJobConfiguration configuration)
13151315 return completedJob ;
13161316 }
13171317
1318- static GoogleCredentials loadCredentials (String credentialFile ) {
1318+ static ServiceAccountCredentials loadCredentials (String credentialFile ) {
13191319 try {
13201320 InputStream keyStream = new ByteArrayInputStream (credentialFile .getBytes ());
1321- return GoogleCredentials .fromStream (keyStream );
1321+ return ServiceAccountCredentials .fromStream (keyStream );
13221322 } catch (IOException e ) {
13231323 fail ("Couldn't create fake JSON credentials." );
13241324 }
Original file line number Diff line number Diff line change 2727import com .google .api .gax .core .FixedCredentialsProvider ;
2828import com .google .api .gax .rpc .ServerStream ;
2929import com .google .api .gax .rpc .UnauthenticatedException ;
30- import com .google .auth .oauth2 .GoogleCredentials ;
30+ import com .google .auth .oauth2 .ServiceAccountCredentials ;
3131import com .google .cloud .RetryOption ;
3232import com .google .cloud .ServiceOptions ;
3333import com .google .cloud .bigquery .BigQuery ;
@@ -1295,10 +1295,10 @@ private Job RunQueryJobAndExpectSuccess(QueryJobConfiguration configuration)
12951295 return completedJob ;
12961296 }
12971297
1298- static GoogleCredentials loadCredentials (String credentialFile ) {
1298+ static ServiceAccountCredentials loadCredentials (String credentialFile ) {
12991299 try {
13001300 InputStream keyStream = new ByteArrayInputStream (credentialFile .getBytes ());
1301- return GoogleCredentials .fromStream (keyStream );
1301+ return ServiceAccountCredentials .fromStream (keyStream );
13021302 } catch (IOException e ) {
13031303 fail ("Couldn't create fake JSON credentials." );
13041304 }
You can’t perform that action at this time.
0 commit comments