ARTEMIS-377 - [Artemis Testsuite] NettySecurityClientTest#testProducerConsumerClientWithSecurityManager fails

This commit is contained in:
Erich Duda 2016-02-01 10:27:37 +01:00 committed by Clebert Suconic
parent 7ca42ef352
commit 0db2d3f097
2 changed files with 3 additions and 1 deletions

View File

@ -19,6 +19,7 @@ package org.apache.activemq.artemis.tests.integration.security;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLDecoder;
import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl;
import org.apache.activemq.artemis.core.server.ActiveMQServer;
@ -60,7 +61,7 @@ public class NettySecurityClientTest extends ActiveMQTestBase {
String[] vmargs = new String[0];
if (withSecurityManager) {
URL securityPolicyURL = Thread.currentThread().getContextClassLoader().getResource("restricted-security-client.policy");
vmargs = new String[]{"-Djava.security.manager", "-Djava.security.policy=" + securityPolicyURL.getPath()};
vmargs = new String[]{"-Djava.security.manager", "-Djava.security.policy=" + URLDecoder.decode(securityPolicyURL.getPath(), "UTF-8")};
}
// spawn a JVM that creates a client with a security manager which sends and receives a

View File

@ -57,4 +57,5 @@ grant {
permission java.util.PropertyPermission "sun.nio.ch.bugLevel", "read";
permission java.lang.RuntimePermission "setContextClassLoader";
permission java.lang.RuntimePermission "accessDeclaredMembers";
permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
};