Skip to content

Commit 12d3cc3

Browse files
committed
Fix broken tests
Signed-off-by: Gulshan Kumar <[email protected]>
1 parent 1b6692e commit 12d3cc3

File tree

10 files changed

+91
-0
lines changed

10 files changed

+91
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The OpenSearch Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
grant {
10+
permission java.net.NetPermission "accessUnixDomainSocket";
11+
permission java.net.SocketPermission "*", "connect,resolve";
12+
};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The OpenSearch Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
grant {
10+
permission java.net.NetPermission "accessUnixDomainSocket";
11+
permission java.net.SocketPermission "*", "connect,resolve";
12+
};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The OpenSearch Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
grant {
10+
permission java.net.NetPermission "accessUnixDomainSocket";
11+
permission java.net.SocketPermission "*", "connect,resolve";
12+
};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The OpenSearch Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
grant {
10+
permission java.net.NetPermission "accessUnixDomainSocket";
11+
permission java.net.SocketPermission "*", "connect,resolve";
12+
};

server/src/test/resources/org/opensearch/bootstrap/test.policy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ grant {
1111
permission java.util.PropertyPermission "*", "read,write";
1212
permission java.security.SecurityPermission "createPolicy.JavaPolicy";
1313
permission java.net.NetPermission "accessUnixDomainSocket";
14+
permission java.net.SocketPermission "*", "accept,connect";
1415
};
1516

1617
grant codeBase "${codebase.framework}" {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The OpenSearch Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
grant {
10+
// allow to test Security policy and codebases
11+
permission java.util.PropertyPermission "*", "read,write";
12+
permission java.security.SecurityPermission "createPolicy.JavaPolicy";
13+
permission java.net.NetPermission "accessUnixDomainSocket";
14+
permission java.net.SocketPermission "*", "accept,connect";
15+
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The OpenSearch Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
grant {
10+
// allow to test Security policy and codebases
11+
permission java.net.NetPermission "accessUnixDomainSocket";
12+
permission java.net.SocketPermission "*", "accept,connect";
13+
};

test/framework/src/test/java/org/opensearch/transport/nio/SimpleMockNioTransportTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ protected int channelsPerNodeConnection() {
9797
return 3;
9898
}
9999

100+
@AwaitsFix(bugUrl = "https://github.com/opensearch-project/OpenSearch/pull/16731")
100101
public void testConnectException() throws UnknownHostException {
101102
try {
102103
serviceA.connectToNode(

test/framework/src/test/resources/org/opensearch/bootstrap/test.policy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88

99
grant codeBase "${codebase.opensearch-nio}" {
1010
permission java.net.NetPermission "accessUnixDomainSocket";
11+
permission java.net.SocketPermission "*", "connect,resolve";
1112
};
1213

1314
grant {
1415
permission java.net.NetPermission "accessUnixDomainSocket";
16+
permission java.net.SocketPermission "*", "connect,resolve";
1517
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The OpenSearch Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
grant {
9+
permission java.net.NetPermission "accessUnixDomainSocket";
10+
permission java.net.SocketPermission "*", "connect,resolve";
11+
};

0 commit comments

Comments
 (0)