Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Elasticsearch under thirdparty container tests #360

Closed
suman-mitra opened this issue Mar 28, 2018 · 8 comments
Closed

Add Elasticsearch under thirdparty container tests #360

suman-mitra opened this issue Mar 28, 2018 · 8 comments
Assignees
Labels
enhancement type:external 3rd party application tests (invoked by the make target 'external')

Comments

@suman-mitra
Copy link
Contributor

This issue is for evaluating and adding elasticsearch under the third party container tests.

#172

There are multiple versions of Elasticsearch available. As of now I've taken up v6.1.3

@suman-mitra
Copy link
Contributor Author

Elasticsearch version :- v6.1.3
Gradle version :- gradle-4.5
JDK Used :- Oracle JDK(jdk8_162) , Build and test was successful.

JDK Used :- OpenJDK with hotspot (OpenJDK8_x64_Linux_20182702) , Build and test was successful.

@suman-mitra
Copy link
Contributor Author

JDK Used :- OpenJDK with OpenJ9 (OpenJDK8-OPENJ9_x64_Linux_jdk8u152-b16).
Build was successful but test failed with below error
ERROR 0.00s | DisableGraphQueryTests (suite) <<< FAILURES!

Throwable #1: junit.framework.AssertionFailedError: Clean up static fields (in @afterclass?) and null them, your test still has references to classes of which the sizes cannot be measured due to security restrictions or Java 9 module encapsulation:

  • private static org.apache.lucene.search.Query org.elasticsearch.index.query.DisableGraphQueryTests.expectedQueryWithUnigram
    at __randomizedtesting.SeedInfo.seed([D06690B811B022B9]:0)
    at java.lang.Thread.run(Thread.java:811)
    Caused by: java.security.AccessControlException: Access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.misc")
    at java.security.AccessController.throwACE(AccessController.java:176)
    at java.security.AccessController.checkPermissionHelper(AccessController.java:236)
    at java.security.AccessController.checkPermission(AccessController.java:371)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
    at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1564)
    at java.lang.Class.checkMemberAccess(Class.java:227)
    at java.lang.Class.getDeclaredFields(Class.java:822)
    at java.security.AccessController.doPrivileged(AccessController.java:638)
    ... 10 more
    Completed [709/1017] in 0.37s, 5 tests, 1 failure <<< FAILURES!

@suman-mitra
Copy link
Contributor Author

I added "permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";" in java.policy file ...it had again failed with the below issue :-

ERROR 0.00s | DisableGraphQueryTests (suite) <<< FAILURES!

Throwable #1: junit.framework.AssertionFailedError: Clean up static fields (in @afterclass?) and null them, your test still has references to classes of which the sizes cannot be measured due to security restrictions or Java 9 module encapsulation:

  • private static org.apache.lucene.search.Query org.elasticsearch.index.query.DisableGraphQueryTests.expectedQueryWithUnigram
    at __randomizedtesting.SeedInfo.seed([1BEE63C0A3868EB5]:0)
    at java.lang.Thread.run(Thread.java:811)
    Caused by: java.security.AccessControlException: Access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.net.www.protocol.jar")
    at java.security.AccessController.throwACE(AccessController.java:176)
    at java.security.AccessController.checkPermissionHelper(AccessController.java:236)
    at java.security.AccessController.checkPermission(AccessController.java:371)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
    at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1564)
    at java.lang.Class.checkMemberAccess(Class.java:227)
    at java.lang.Class.getDeclaredFields(Class.java:822)
    at java.security.AccessController.doPrivileged(AccessController.java:638)
    ... 10 more
    Completed [240/1017] in 0.98s, 5 tests, 1 failure <<< FAILURES!

HEARTBEAT J0 PID([email protected]): 2018-03-21T13:07:40, stalled for 10.5s at: BalanceUnbalancedClusterTests.testRun

Task :core:test FAILED
Tests with failures:

  • org.elasticsearch.index.query.DisableGraphQueryTests (suite)

@suman-mitra
Copy link
Contributor Author

After adding "permission java.lang.RuntimePermission "accessClassInPackage.sun.net.www.protocol.jar""; in java.policy file ...it had again failed with the below issue :-

ERROR 0.00s | DisableGraphQueryTests (suite) <<< FAILURES!

Throwable #1: junit.framework.AssertionFailedError: Clean up static fields (in @afterclass?) and null them, your test still has references to classes of which the sizes cannot be measured due to security restrictions or Java 9 module encapsulation:

  • private static org.apache.lucene.search.Query org.elasticsearch.index.query.DisableGraphQueryTests.expectedQueryWithUnigram
    at __randomizedtesting.SeedInfo.seed([EBC9C95E3897C844]:0)
    at java.lang.Thread.run(Thread.java:811)
    Caused by: java.security.AccessControlException: Access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.net.www.protocol.file")
    at java.security.AccessController.throwACE(AccessController.java:176)
    at java.security.AccessController.checkPermissionHelper(AccessController.java:236)
    at java.security.AccessController.checkPermission(AccessController.java:371)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
    at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1564)
    at java.lang.Class.checkMemberAccess(Class.java:227)
    at java.lang.Class.getDeclaredFields(Class.java:822)
    at java.security.AccessController.doPrivileged(AccessController.java:638)
    ... 10 more
    Completed [167/1017] in 0.53s, 5 tests, 1 failure <<< FAILURES!

HEARTBEAT J0 PID([email protected]): 2018-03-21T13:19:18, stalled for 10.2s at: BalanceUnbalancedClusterTests.testRun

Task :core:test
Tests with failures:

  • org.elasticsearch.index.query.DisableGraphQueryTests (suite)

@suman-mitra
Copy link
Contributor Author

Added "permission java.lang.RuntimePermission "accessClassInPackage.sun.net.www.protocol.file";" in the java.policy file and reran the tests.it failed again :-

ERROR 0.00s | DisableGraphQueryTests (suite) <<< FAILURES!

Throwable #1: junit.framework.AssertionFailedError: Clean up static fields (in @afterclass?) and null them, your test still has references to classes of which the sizes cannot be measured due to security restrictions or Java 9 module encapsulation:

  • private static org.apache.lucene.search.Query org.elasticsearch.index.query.DisableGraphQueryTests.expectedQueryWithUnigram
    at __randomizedtesting.SeedInfo.seed([E02DC5DF5944875B]:0)
    at java.lang.Thread.run(Thread.java:811)
    Caused by: java.security.AccessControlException: Access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.security.provider.certpath")
    at java.security.AccessController.throwACE(AccessController.java:176)
    at java.security.AccessController.checkPermissionHelper(AccessController.java:236)
    at java.security.AccessController.checkPermission(AccessController.java:371)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
    at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1564)
    at java.lang.Class.checkMemberAccess(Class.java:227)
    at java.lang.Class.getDeclaredFields(Class.java:822)
    at java.security.AccessController.doPrivileged(AccessController.java:638)
    ... 10 more
    Completed [913/1017] in 0.30s, 5 tests, 1 failure <<< FAILURES!

Task :core:test FAILED
Tests with failures:

  • org.elasticsearch.index.query.DisableGraphQueryTests (suite)

@suman-mitra
Copy link
Contributor Author

Added " permission java.lang.RuntimePermission "accessClassInPackage.sun.security.provider.certpath";" in the java.policy file and reran the tests.it failed again :-

Task :client:rest:test
==> Test Info: seed=87D585D8A968958; jvm=1; suites=12

Suite: org.elasticsearch.client.RestClientBuilderIntegTests
2> Mar 21, 2018 2:17:13 PM com.carrotsearch.randomizedtesting.ThreadLeakControl checkThreadLeaks
2> WARNING: Will linger awaiting termination of 2 leaked thread(s).
2> Mar 21, 2018 2:17:18 PM com.carrotsearch.randomizedtesting.ThreadLeakControl checkThreadLeaks
2> SEVERE: 1 thread leaked from SUITE scope at org.elasticsearch.client.RestClientBuilderIntegTests:
2> 1) Thread[id=28, name=ClassCache Reaper, state=WAITING, group=TGRP-RestClientBuilderIntegTests]
2> at java.lang.Object.wait(Native Method)
2> at java.lang.Object.wait(Object.java:218)
2> at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:138)
2> at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:110)
2> at java.io.ClassCache$Reaper.run(ClassCache.java:232)
2> Mar 21, 2018 2:17:18 PM com.carrotsearch.randomizedtesting.ThreadLeakControl tryToInterruptAll
2> INFO: Starting to interrupt leaked threads:
2> 1) Thread[id=28, name=ClassCache Reaper, state=WAITING, group=TGRP-RestClientBuilderIntegTests]
2> Mar 21, 2018 2:17:21 PM com.carrotsearch.randomizedtesting.ThreadLeakControl tryToInterruptAll
2> SEVERE: There are still zombie threads that couldn't be terminated:
2> 1) Thread[id=28, name=ClassCache Reaper, state=WAITING, group=TGRP-RestClientBuilderIntegTests]
2> at java.lang.Object.wait(Native Method)
2> at java.lang.Object.wait(Object.java:218)
2> at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:138)
2> at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:110)
2> at java.io.ClassCache$Reaper.run(ClassCache.java:232)
ERROR 0.00s | RestClientBuilderIntegTests (suite) <<< FAILURES!

Throwable #1: com.carrotsearch.randomizedtesting.ThreadLeakError: 1 thread leaked from SUITE scope at org.elasticsearch.client.RestClientBuilderIntegTests:

  1. Thread[id=28, name=ClassCache Reaper, state=WAITING, group=TGRP-RestClientBuilderIntegTests]
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:218)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:138)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:110)
    at java.io.ClassCache$Reaper.run(ClassCache.java:232)
    at __randomizedtesting.SeedInfo.seed([87D585D8A968958]:0)Throwable need slave machines to set up build #2: com.carrotsearch.randomizedtesting.ThreadLeakError: There are still zombie threads that couldn't be terminated:
  2. Thread[id=28, name=ClassCache Reaper, state=WAITING, group=TGRP-RestClientBuilderIntegTests]
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:218)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:138)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:110)
    at java.io.ClassCache$Reaper.run(ClassCache.java:232)
    at __randomizedtesting.SeedInfo.seed([87D585D8A968958]:0)
    Completed [2/12] in 9.00s, 1 test, 2 errors <<< FAILURES!

@suman-mitra
Copy link
Contributor Author

So,we added the below in java.policy file

permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
permission java.lang.RuntimePermission "accessClassInPackage.sun.net.www.protocol.jar";
permission java.lang.RuntimePermission "accessClassInPackage.sun.net.www.protocol.file";
permission java.lang.RuntimePermission "accessClassInPackage.sun.security.provider.certpath";

and encountered the above mentioned error (mentioned below )

2> Mar 21, 2018 2:17:13 PM com.carrotsearch.randomizedtesting.ThreadLeakControl checkThreadLeaks
2> WARNING: Will linger awaiting termination of 2 leaked thread(s).
2> Mar 21, 2018 2:17:18 PM com.carrotsearch.randomizedtesting.ThreadLeakControl checkThreadLeaks
2> SEVERE: 1 thread leaked from SUITE scope at org.elasticsearch.client.RestClientBuilderIntegTests:
2> 1) Thread[id=28, name=ClassCache Reaper, state=WAITING, group=TGRP-RestClientBuilderIntegTests]
2> at java.lang.Object.wait(Native Method)
2> at java.lang.Object.wait(Object.java:218)
2> at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:138)
2> at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:110)
2> at java.io.ClassCache$Reaper.run(ClassCache.java:232)

@suman-mitra suman-mitra changed the title Add Elasticsearch uner thirdparty container tests Add Elasticsearch under thirdparty container tests Mar 28, 2018
@smlambert smlambert added the type:external 3rd party application tests (invoked by the make target 'external') label Mar 28, 2018
@smlambert
Copy link
Contributor

Fixed by #410

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement type:external 3rd party application tests (invoked by the make target 'external')
Projects
None yet
Development

No branches or pull requests

2 participants