wazuh-packages
wazuh-packages copied to clipboard
`Wazuh indexer base` test failed in RPM package generation
| Wazuh version | Install type | Action performed | Platform |
|---|---|---|---|
| 4.3.0 | Wazuh indexer base | Build | - |
An error message has been detected when generating the RPM Wazuh indexer base package generation, this message seems to be related to the internal tests that are executed and do not affect the final package, but we must review it and fix this behavior.
> Task :modules:systemd:test FAILED
org.opensearch.systemd.SystemdPluginTests > 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.<clinit>(BootstrapForTesting.java:101)
at org.opensearch.test.OpenSearchTestCase.<clinit>(OpenSearchTestCase.java:257)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:468)
at com.carrotsearch.randomizedtesting.RandomizedRunner$2.run(RandomizedRunner.java:623)
Suite: Test class org.opensearch.systemd.SystemdPluginTests
2> java.lang.RuntimeException: can not run opensearch as root
at org.opensearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:124)
at org.opensearch.bootstrap.BootstrapForTesting.<clinit>(BootstrapForTesting.java:101)
at org.opensearch.test.OpenSearchTestCase.<clinit>(OpenSearchTestCase.java:257)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:468)
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:832)
Suppressed: java.lang.IllegalStateException: No context information for thread: Thread[id=20, name=Thread-4, state=RUNNABLE, group=TGRP-SystemdPluginTests]. 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:1993)
Tests with failures:
- org.opensearch.systemd.SystemdPluginTests.classMethod
1 test completed, 1 failed
FAILURE: Build failed with an exception.