@@ -90,8 +90,8 @@ public void testInvalidTokenUriForAuthType0() {
9090 + "EndpointOverrides=OAuth2=brokenuri{};" ;
9191 Map <String , String > oauthProperties =
9292 BigQueryJdbcOAuthUtility .parseOAuthProperties (connectionString , null );
93- Map <String , String > overrideProperties =
94- BigQueryJdbcUrlUtility . parseOverrideProperties ( connectionString , null );
93+ Map <String , String > overrideProperties = new HashMap <>();
94+ overrideProperties . put ( BigQueryJdbcUrlUtility . OAUTH2_TOKEN_URI_PROPERTY_NAME , "brokenuri{}" );
9595
9696 try {
9797 BigQueryJdbcOAuthUtility .getCredentials (oauthProperties , overrideProperties , null );
@@ -234,8 +234,9 @@ public void testGenerateUserAuthURLOverrideOauthEndpoint() {
234234 + ";" ;
235235 Map <String , String > authProperties =
236236 BigQueryJdbcOAuthUtility .parseOAuthProperties (connectionString , null );
237- Map <String , String > overrideProperties =
238- BigQueryJdbcUrlUtility .parseOverrideProperties (connectionString , null );
237+ Map <String , String > overrideProperties = new HashMap <>();
238+ overrideProperties .put (
239+ BigQueryJdbcUrlUtility .OAUTH2_TOKEN_URI_PROPERTY_NAME , overrideTokenSeverURI .toString ());
239240
240241 UserAuthorizer userAuthorizer =
241242 BigQueryJdbcOAuthUtility .getUserAuthorizer (
@@ -274,8 +275,10 @@ public void testParseOverridePropsForRefreshTokenAuth() {
274275
275276 Map <String , String > authProperties =
276277 BigQueryJdbcOAuthUtility .parseOAuthProperties (connectionString , null );
277- Map <String , String > overrideProperties =
278- BigQueryJdbcUrlUtility .parseOverrideProperties (connectionString , null );
278+ Map <String , String > overrideProperties = new HashMap <>();
279+ overrideProperties .put (
280+ BigQueryJdbcUrlUtility .OAUTH2_TOKEN_URI_PROPERTY_NAME ,
281+ "https://oauth2-private.p.googleapis.com/token" );
279282
280283 UserCredentials userCredentials =
281284 BigQueryJdbcOAuthUtility .getPreGeneratedRefreshTokenCredentials (
@@ -296,9 +299,8 @@ public void testParseBYOIDProps() {
296299 "jdbc:bigquery://https://www.googleapis.com/bigquery/v2:433;OAuthType=4;"
297300 + "ProjectId=MyBigQueryProject;"
298301 + "BYOID_AudienceUri=//iam.googleapis.com/locations/global/workforcePools/pool-id/providers/provider-id;"
299- + "BYOID_PoolUserProject=workforceProjectNumber;"
300- + "BYOID_CredentialSource={\" file\" : \" C:\\ \\ Token.txt\" };"
301- + "BYOID_SA_Impersonation_Uri=testSA;"
302+ + "BYOID_PoolUserProject=workforceProjectNumber;BYOID_CredentialSource={\" file\" :"
303+ + " \" C:\\ \\ Token.txt\" };BYOID_SA_Impersonation_Uri=testSA;"
302304 + "BYOID_SubjectTokenType=urn:ietf:params:oauth:tokentype:jwt;"
303305 + "BYOID_TokenUri=https://testuri.com/v1/token" ,
304306 null );
0 commit comments