From d6e9cbc0c02c87f6153fb54b31456ef2ba940b9f Mon Sep 17 00:00:00 2001 From: Chris Knoll Date: Tue, 16 Apr 2024 23:17:06 -0400 Subject: [PATCH] Clear security cache between tests. --- .../java/org/ohdsi/webapi/security/PermissionTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/ohdsi/webapi/security/PermissionTest.java b/src/test/java/org/ohdsi/webapi/security/PermissionTest.java index 5064ea75b..c8a83be09 100644 --- a/src/test/java/org/ohdsi/webapi/security/PermissionTest.java +++ b/src/test/java/org/ohdsi/webapi/security/PermissionTest.java @@ -66,6 +66,8 @@ public void setup() { @Test public void permsTest() throws Exception { + // need to clear authorization cache before each test + permissionManager.clearAuthorizationInfoCache(); Subject s = SecurityUtils.getSubject(); String subjetName = permissionManager.getSubjectName(); @@ -86,11 +88,10 @@ public void permsTest() throws Exception { @Test public void wildcardTest() throws Exception { + // need to clear authorization cache before each test + permissionManager.clearAuthorizationInfoCache(); Subject s = SecurityUtils.getSubject(); - String subjetName = permissionManager.getSubjectName(); - final String[] testDataSetsPaths = new String[] {"/permission/wildcardTest_PREP.json" }; - loadPrepData(testDataSetsPaths, DatabaseOperation.REFRESH); // subject has * permisison, so any permisison test is true