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

TEST BUG: MergeSchedulerSettingsTests fails always on small machines #559

Merged

Conversation

rmuir
Copy link
Contributor

@rmuir rmuir commented Apr 15, 2021

MergeSchedulerSettingsTests tweaks the node.processors setting: sets it explicitly to values of 2 and 8.

On a machine with only 4 threads (e.g. my 2-core thinkpad), the test fails, because it creates unexpected warnings about node.processors being set higher than the number of cpus.

The problem can be reproduced always, by pretending to be single core:

./gradlew ':server:test' --tests "org.opensearch.index.MergeSchedulerSettingsTests.testMaxThreadAndMergeCount" -Dtests.jvm.argline="-XX:ActiveProcessorCount=1"

2> java.lang.AssertionError: unexpected warning headers
    Expected: an empty collection
         but: <[299 OpenSearch-7.10.3-SNAPSHOT-unknown "setting [node.processors] to value [2] which is more than available processors [1] is deprecated", 299 OpenSearch-7.10.3-SNAPSHOT-unknown "setting [node.processors] to value [8] which is more than available processors [1] is deprecated"]>
        at __randomizedtesting.SeedInfo.seed([708A64B680F01AE7:435CBB01D2879CB1]:0)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
        at org.junit.Assert.assertThat(Assert.java:956)
        at org.opensearch.test.OpenSearchTestCase.ensureNoWarnings(OpenSearchTestCase.java:449)
        at org.opensearch.test.OpenSearchTestCase.after(OpenSearchTestCase.java:412)
    ...

Instead, allow the test to provoke these specific warnings.

Signed-off-by: Robert Muir rmuir@apache.org

MergeSchedulerSettingsTests tweaks the `node.processors` setting: sets it
explicitly to values of `2` and `8`. On a machine with only `4` threads
(e.g. my 2-core thinkpad), the test fails, because it creates unexpected
warnings about `node.processors` being set higher than the number of
cpus.

The problem can be reproduced always, by pretending to be single core:
```
./gradlew ':server:test' --tests "org.opensearch.index.MergeSchedulerSettingsTests.testMaxThreadAndMergeCount" -Dtests.jvm.argline="-XX:ActiveProcessorCount=1"
```

Instead, allow the test to provoke these specific warnings.

Signed-off-by: Robert Muir <rmuir@apache.org>
@odfe-release-bot
Copy link

✅   Gradle Wrapper Validation success 09d6b3d

@odfe-release-bot
Copy link

✅   DCO Check Passed 09d6b3d

@odfe-release-bot
Copy link

✅   Gradle Precommit success 09d6b3d

Copy link
Collaborator

@nknize nknize left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! LGTM!

@nknize
Copy link
Collaborator

nknize commented Apr 15, 2021

start gradle check

@odfe-release-bot
Copy link

✅   Gradle Check success 09d6b3d
Log 78

Reports 78

@peterzhuamazon
Copy link
Member

start dco check
start wrapper validation
start gradle precommit

@odfe-release-bot
Copy link

✅   Gradle Wrapper Validation success 09d6b3d

@odfe-release-bot
Copy link

✅   DCO Check Passed 09d6b3d

@odfe-release-bot
Copy link

✅   Gradle Precommit success 09d6b3d

@peterzhuamazon peterzhuamazon added the community Issues raised by community members and contributors label Apr 15, 2021
@nknize nknize merged commit bdb7aad into opensearch-project:main Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Issues raised by community members and contributors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants