set context class loader for security tests to ensure Shiro can see all classes from com.sap.sse.security and its required bundles

This commit is contained in:
Axel Uhl committed 2014-11-05 10:31:50 +01:00
1 parent 9240dce7ae
commit e52a717118
1 file changed
+1
@@ -35,6 +35,7 @@ public class LoginTest {
store = new UserStoreImpl();
UsernamePasswordRealm.setTestUserStore(store);
Activator.setTestUserStore(store);
Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); // to enable shiro to find classes from com.sap.sse.security
new SecurityServiceImpl(store, /* mailProperties */ new Properties());
}