KEYCLOAK-14510 Properly close Response object

This commit is contained in:
Hynek Mlnarik 2020-09-02 22:08:53 +02:00 committed by Hynek Mlnařík
parent bed664e4fe
commit 1c4a2db8e1
4 changed files with 4 additions and 4 deletions

View file

@ -266,7 +266,7 @@ public class UsersTest extends AbstractAdminTest {
String policyName = "test-policy";
policy.setName(policyName);
policy.setUsers(Collections.singleton(testUserId));
authorizationResource.policies().user().create(policy);
authorizationResource.policies().user().create(policy).close();
PolicyRepresentation policyRepresentation = authorizationResource.policies().findByName(policyName);
//add the policy to grp1
Optional<GroupRepresentation> optional = groups.stream().filter(g -> g.getName().equals("grp1")).findFirst();

View file

@ -91,7 +91,7 @@ public class AggregatePolicyManagementTest extends AbstractAuthorizationSettings
policyC.setName("Policy C");
policyC.addUser("test");
policies.user().create(policyC);
policies.user().create(policyC).close();
}
@Test

View file

@ -75,7 +75,7 @@ public class ResourcePermissionManagementTest extends AbstractAuthorizationSetti
policyC.setName("Policy C");
policyC.addUser("test");
policies.user().create(policyC);
policies.user().create(policyC).close();
ResourcesResource resources = authorization.resources();

View file

@ -75,7 +75,7 @@ public class ScopePermissionManagementTest extends AbstractAuthorizationSettings
policyC.setName("Policy C");
policyC.addUser("test");
policies.user().create(policyC);
policies.user().create(policyC).close();
authorization.scopes().create(new ScopeRepresentation("Scope A"));
authorization.scopes().create(new ScopeRepresentation("Scope B"));