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

Wazuh indexer base test failed in RPM package generation #1433

Closed
rauldpm opened this issue Apr 5, 2022 · 2 comments
Closed

Wazuh indexer base test failed in RPM package generation #1433

rauldpm opened this issue Apr 5, 2022 · 2 comments

Comments

@rauldpm
Copy link
Member

rauldpm commented Apr 5, 2022

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.
@rauldpm rauldpm changed the title Fix test failed in indexer base rpm package generation Fix failed test in indexer base rpm package generation Apr 5, 2022
@rauldpm rauldpm changed the title Fix failed test in indexer base rpm package generation Wazuh indexer base test failed in RPM package generation Sep 28, 2022
@teddytpc1 teddytpc1 added level/task Subtask issue type/bug Bug issue labels May 23, 2023
@gdiazlo
Copy link
Member

gdiazlo commented Aug 22, 2023

Blocked by wazuh/wazuh-indexer#4

@AlexRuiz7
Copy link
Member

Not reproducible on newer (latest) wazuh-indexer versions.

@AlexRuiz7 AlexRuiz7 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants