Skip to content

Commit 8dee871

Browse files
authored
chore: Remove potential flakyness in OAuth2ServiceTest (#1218)
1 parent 74051b2 commit 8dee871

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • cloudplatform/connectivity-oauth/src/test/java/com/sap/cloud/sdk/cloudplatform/connectivity

cloudplatform/connectivity-oauth/src/test/java/com/sap/cloud/sdk/cloudplatform/connectivity/OAuth2ServiceTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,12 @@ void httpClientTenantSeparation()
287287
.willReturn(okJson(RESPONSE_TEMPLATE.formatted(TOKEN_1)).withHeader("Set-Cookie", "myCookie=123")));
288288

289289
final OAuth2Service service =
290-
OAuth2Service.builder().withTokenUri(SERVER_1.baseUrl()).withIdentity(IDENTITY_1).build();
290+
OAuth2Service
291+
.builder()
292+
.withTokenUri(SERVER_1.baseUrl())
293+
.withIdentity(IDENTITY_1)
294+
.withTimeLimiter(ResilienceConfiguration.TimeLimiterConfiguration.disabled())
295+
.build();
291296

292297
TenantAccessor.executeWithTenant(new DefaultTenant("tenant1"), service::retrieveAccessToken);
293298
TenantAccessor.executeWithTenant(new DefaultTenant("tenant2"), service::retrieveAccessToken);

0 commit comments

Comments
 (0)