-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
org.opensearch.plugin:opensearch-dashboards:2.3.0 has issues with opensearch-dashboards unit test #14688
Comments
The error says |
Before getting the above error noticed this output |
[Triage - attendees 1 2 3 4]
|
can u give me how to explicitly remove the task which is not required to execute. currently iam running using the command |
@swaruparameshpajju i think the public slack #dev channel is better suited for questions like these, give it a try? https://opensearch.org/slack.html Closing this for now since it doesn't look like a bug in the scripts. |
Describe the bug
[root@b41ffec59270 OpenSearch]# ./gradlew :modules:opensearch-dashboards:test
org.opensearch.dashboards.OpenSearchDashboardsPluginTests > classMethod FAILED
java.lang.RuntimeException: can not run opensearch as root
Exception in thread "Thread-4" java.lang.NoClassDefFoundError: Could not initialize class org.opensearch.test.OpenSearchTestCase
at org.opensearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:124)
at org.opensearch.bootstrap.BootstrapForTesting.(BootstrapForTesting.java:105)
at java.base/java.lang.Thread.run(Thread.java:833)
at org.opensearch.test.OpenSearchTestCase.(OpenSearchTestCase.java:257)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at com.carrotsearch.randomizedtesting.RandomizedRunner$2.run(RandomizedRunner.java:623)
Suppressed: java.lang.IllegalStateException: No context information for thread: Thread[id=32, name=Thread-4, state=RUNNABLE, group=TGRP-OpenSearchDashboardsPluginTests]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @afterclass boundary (for example, static test class initializers are not permitted to access random contexts).
at com.carrotsearch.randomizedtesting.RandomizedContext.context(RandomizedContext.java:249)
at com.carrotsearch.randomizedtesting.RandomizedContext.current(RandomizedContext.java:134)
at com.carrotsearch.randomizedtesting.RandomizedRunner.augmentStackTrace(RandomizedRunner.java:1885)
at com.carrotsearch.randomizedtesting.RunnerThreadGroup.uncaughtException(RunnerThreadGroup.java:20)
at java.base/java.lang.Thread.dispatchUncaughtException(Thread.java:2008)
Suite: Test class org.opensearch.dashboards.OpenSearchDashboardsPluginTests
2> java.lang.RuntimeException: can not run opensearch as root
at org.opensearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:124)
at org.opensearch.bootstrap.BootstrapForTesting.(BootstrapForTesting.java:105)
at org.opensearch.test.OpenSearchTestCase.(OpenSearchTestCase.java:257)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at com.carrotsearch.randomizedtesting.RandomizedRunner$2.run(RandomizedRunner.java:623)
OpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=warn; support was removed in 17.0
org.opensearch.dashboards.OpenSearchDashboardsPluginTests > classMethod FAILED
java.lang.RuntimeException: can not run opensearch as root
at org.opensearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:124)
at org.opensearch.bootstrap.BootstrapForTesting.(BootstrapForTesting.java:105)
at org.opensearch.test.OpenSearchTestCase.(OpenSearchTestCase.java:257)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at com.carrotsearch.randomizedtesting.RandomizedRunner$2.run(RandomizedRunner.java:623)
Suite: Test class org.opensearch.dashboards.OpenSearchDashboardsPluginTests
2> java.lang.RuntimeException: can not run opensearch as root
at org.opensearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:124)
at org.opensearch.bootstrap.BootstrapForTesting.(BootstrapForTesting.java:105)
at org.opensearch.test.OpenSearchTestCase.(OpenSearchTestCase.java:257)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at com.carrotsearch.randomizedtesting.RandomizedRunner$2.run(RandomizedRunner.java:623)
Exception in thread "Thread-4" java.lang.NoClassDefFoundError: Could not initialize class org.opensearch.test.OpenSearchTestCase
at java.base/java.lang.Thread.run(Thread.java:833)
Suppressed: java.lang.IllegalStateException: No context information for thread: Thread[id=32, name=Thread-4, state=RUNNABLE, group=TGRP-OpenSearchDashboardsPluginTests]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @afterclass boundary (for example, static test class initializers are not permitted to access random contexts).
at com.carrotsearch.randomizedtesting.RandomizedContext.context(RandomizedContext.java:249)
at com.carrotsearch.randomizedtesting.RandomizedContext.current(RandomizedContext.java:134)
at com.carrotsearch.randomizedtesting.RandomizedRunner.augmentStackTrace(RandomizedRunner.java:1885)
at com.carrotsearch.randomizedtesting.RunnerThreadGroup.uncaughtException(RunnerThreadGroup.java:20)
at java.base/java.lang.Thread.dispatchUncaughtException(Thread.java:2008)
OpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=warn; support was removed in 17.0
org.opensearch.dashboards.OpenSearchDashboardsPluginTests > classMethod FAILED
java.lang.RuntimeException: can not run opensearch as root
at org.opensearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:124)
at org.opensearch.bootstrap.BootstrapForTesting.(BootstrapForTesting.java:105)
at org.opensearch.test.OpenSearchTestCase.(OpenSearchTestCase.java:257)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at com.carrotsearch.randomizedtesting.RandomizedRunner$2.run(RandomizedRunner.java:623)
Suite: Test class org.opensearch.dashboards.OpenSearchDashboardsPluginTests
2> java.lang.RuntimeException: can not run opensearch as root
at org.opensearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:124)
at org.opensearch.bootstrap.BootstrapForTesting.(BootstrapForTesting.java:105)
at org.opensearch.test.OpenSearchTestCase.(OpenSearchTestCase.java:257)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at com.carrotsearch.randomizedtesting.RandomizedRunner$2.run(RandomizedRunner.java:623)
Exception in thread "Thread-4" java.lang.NoClassDefFoundError: Could not initialize class org.opensearch.test.OpenSearchTestCase
at java.base/java.lang.Thread.run(Thread.java:833)
Suppressed: java.lang.IllegalStateException: No context information for thread: Thread[id=32, name=Thread-4, state=RUNNABLE, group=TGRP-OpenSearchDashboardsPluginTests]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @afterclass boundary (for example, static test class initializers are not permitted to access random contexts).
at com.carrotsearch.randomizedtesting.RandomizedContext.context(RandomizedContext.java:249)
at com.carrotsearch.randomizedtesting.RandomizedContext.current(RandomizedContext.java:134)
at com.carrotsearch.randomizedtesting.RandomizedRunner.augmentStackTrace(RandomizedRunner.java:1885)
at com.carrotsearch.randomizedtesting.RunnerThreadGroup.uncaughtException(RunnerThreadGroup.java:20)
at java.base/java.lang.Thread.dispatchUncaughtException(Thread.java:2008)
OpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=warn; support was removed in 17.0
Exception in thread "Thread-4" java.lang.NoClassDefFoundError: Could not initialize class org.opensearch.test.OpenSearchTestCase
at java.base/java.lang.Thread.run(Thread.java:833)
Suppressed: java.lang.IllegalStateException: No context information for thread: Thread[id=32, name=Thread-4, state=RUNNABLE, group=TGRP-OpenSearchDashboardsPluginTests]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @afterclass boundary (for example, static test class initializers are not permitted to access random contexts).
at com.carrotsearch.randomizedtesting.RandomizedContext.context(RandomizedContext.java:249)
at com.carrotsearch.randomizedtesting.RandomizedContext.current(RandomizedContext.java:134)
at com.carrotsearch.randomizedtesting.RandomizedRunner.augmentStackTrace(RandomizedRunner.java:1885)
at com.carrotsearch.randomizedtesting.RunnerThreadGroup.uncaughtException(RunnerThreadGroup.java:20)
at java.base/java.lang.Thread.dispatchUncaughtException(Thread.java:2008)
org.opensearch.dashboards.OpenSearchDashboardsPluginTests > classMethod FAILED
java.lang.RuntimeException: can not run opensearch as root
at org.opensearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:124)
at org.opensearch.bootstrap.BootstrapForTesting.(BootstrapForTesting.java:105)
at org.opensearch.test.OpenSearchTestCase.(OpenSearchTestCase.java:257)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at com.carrotsearch.randomizedtesting.RandomizedRunner$2.run(RandomizedRunner.java:623)
Suite: Test class org.opensearch.dashboards.OpenSearchDashboardsPluginTests
2> java.lang.RuntimeException: can not run opensearch as root
at org.opensearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:124)
at org.opensearch.bootstrap.BootstrapForTesting.(BootstrapForTesting.java:105)
at org.opensearch.test.OpenSearchTestCase.(OpenSearchTestCase.java:257)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at com.carrotsearch.randomizedtesting.RandomizedRunner$2.run(RandomizedRunner.java:623)
Tests with failures:
4 tests completed, 4 failed
FAILURE: Build failed with an exception.
Related component
Other
To Reproduce
Execution failed for task ':modules:opensearch-dashboards:test'.
Expected behavior
Execution failed for task ':modules:opensearch-dashboards:test'.
Additional Details
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: