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

[BUG] org.opensearch.common.settings.SettingTests.testMemorySizeWithFallbackValue is flaky #12705

Closed
kkewwei opened this issue Mar 17, 2024 · 1 comment · Fixed by #12933
Closed
Labels
bug Something isn't working Other

Comments

@kkewwei
Copy link
Contributor

kkewwei commented Mar 17, 2024

Describe the bug

org.opensearch.common.settings.SettingTests.testMemorySizeWithFallbackValue is flaky.

Related component

Other

To Reproduce

JvmInfo.jvmInfo().getMem().getHeapMax().getBytes()=8.0gb

./gradlew ':server:test' --tests "org.opensearch.common.settings.SettingTests.testMemorySizeWithFallbackValue" -Dtests.seed=B6AA005F20EE7928 -Dtests.security.manager=true -Dtests.jvms=1 -Dtests.heap.size=1g -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=sq -Dtests.timezone=Africa/Asmera -Druntime.java=17

if JvmInfo.jvmInfo().getMem().getHeapMax().getBytes()=8gb, (JvmInfo.jvmInfo().getMem().getHeapMax().getBytes() * 0.3) > Integex.MAX, then (long)((int) value) will lose precision.

assertEquals(new ByteSizeValue((int) (JvmInfo.jvmInfo().getMem().getHeapMax().getBytes() * 0.3)), value.get());

Expected behavior

Test should pass

Additional Details

Screenshots
image

@kkewwei kkewwei added bug Something isn't working untriaged labels Mar 17, 2024
@github-actions github-actions bot added the Other label Mar 17, 2024
@andrross
Copy link
Member

[Triage - attendees 1 2 3 4 5 6]
@kkewwei Thanks for filing. Looking forward to seeing the fix merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Other
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants