forked from keycloak/keycloak
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JPA map storage: test failures after cache was disabled
Closes keycloak#12118
- Loading branch information
Showing
7 changed files
with
68 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,6 +114,7 @@ | |
import java.util.stream.Collectors; | ||
import java.util.stream.Stream; | ||
import java.util.UUID; | ||
import org.keycloak.services.ErrorResponse; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Stian Thorgersen</a> | ||
|
@@ -302,6 +303,8 @@ public Response clearEventStore(@QueryParam("realmId") String realmId) { | |
EventStoreProvider eventStore = session.getProvider(EventStoreProvider.class); | ||
RealmModel realm = session.realms().getRealm(realmId); | ||
|
||
if (realm == null) return ErrorResponse.error("Realm not found", Response.Status.NOT_FOUND); | ||
|
||
eventStore.clear(realm); | ||
return Response.noContent().build(); | ||
} | ||
|
@@ -427,6 +430,8 @@ public Response clearAdminEventStore(@QueryParam("realmId") String realmId) { | |
EventStoreProvider eventStore = session.getProvider(EventStoreProvider.class); | ||
RealmModel realm = session.realms().getRealm(realmId); | ||
|
||
if (realm == null) return ErrorResponse.error("Realm not found", Response.Status.NOT_FOUND); | ||
|
||
eventStore.clearAdmin(realm); | ||
return Response.noContent().build(); | ||
} | ||
|
@@ -437,6 +442,9 @@ public Response clearAdminEventStore(@QueryParam("realmId") String realmId) { | |
public Response clearAdminEventStore(@QueryParam("realmId") String realmId, @QueryParam("olderThan") long olderThan) { | ||
EventStoreProvider eventStore = session.getProvider(EventStoreProvider.class); | ||
RealmModel realm = session.realms().getRealm(realmId); | ||
|
||
if (realm == null) return ErrorResponse.error("Realm not found", Response.Status.NOT_FOUND); | ||
|
||
eventStore.clearAdmin(realm, olderThan); | ||
return Response.noContent().build(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.