From d2c69701e6f033b8eff6cf4cf71de4eed6620b04 Mon Sep 17 00:00:00 2001 From: Lee Hinman Date: Wed, 10 May 2017 11:27:57 -0600 Subject: [PATCH] Fix SocketPermission in test framework for alpha2 bump It was using the wrong version, which can cause errors like ``` 1> java.security.AccessControlException: access denied ("java.net.SocketPermission" "[0:0:0:0:0:0:0:1]:34221" "connect,resolve") 1> at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:1.8.0_111] 1> at java.security.AccessController.checkPermission(AccessController.java:884) ~[?:1.8.0_111] 1> at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) ~[?:1.8.0_111] 1> at java.lang.SecurityManager.checkConnect(SecurityManager.java:1051) ~[?:1.8.0_111] 1> at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:625) ~[?:?] 1> at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processSessionRequests(DefaultConnectingIOReactor.java:273) ~[httpcore-nio-4.4.5.jar:4.4.5] 1> at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:139) ~[httpcore-nio-4.4.5.jar:4.4.5] 1> at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348) ~[httpcore-nio-4.4.5.jar:4.4.5] 1> at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:192) ~[httpasyncclient-4.1.2.jar:4.1.2] 1> at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64) ~[httpasyncclient-4.1.2.jar:4.1.2] ``` When running tests --- .../resources/org/elasticsearch/bootstrap/test-framework.policy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy b/core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy index 1e26c42a4cc..c7267715dcd 100644 --- a/core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy +++ b/core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy @@ -64,7 +64,7 @@ grant codeBase "${codebase.mocksocket-1.1.jar}" { }; -grant codeBase "${codebase.rest-6.0.0-alpha1-SNAPSHOT.jar}" { +grant codeBase "${codebase.rest-6.0.0-alpha2-SNAPSHOT.jar}" { // rest makes socket connections for rest tests permission java.net.SocketPermission "*", "connect"; };