-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Fix CmdModifierTest#testMemoryLimitModified
in cgroup2 environment.
#4375
Fix CmdModifierTest#testMemoryLimitModified
in cgroup2 environment.
#4375
Conversation
50b1920
to
f5c0864
Compare
Hi @cac03, Thanks for submitting a PR! I have an idea: |
Hi @bsideup !
I think that's cleaner solution Thank you for the hint! |
The `testMemoryLimitModified` was failing in cgroup2 environment because of the missing `/sys/fs/cgroup/memory/memory.limit_in_bytes` file. In the cgroup2 environment a new file should be checked instead -- `/sys/fs/cgroup/memory.max`. This commit intrdocues changes to `cat` both files: 1. `/sys/fs/cgroup/memory/memory.limit_in_bytes` from the first version of cgroup 2. `/sys/fs/cgroup/memory.max` from the second Similar issues: 1. oracle/docker-images#1939 2. apify/crawlee#693
f5c0864
to
a8f45c7
Compare
@bsideup I've updated the PR Can you please take a look? |
docs/examples/junit4/generic/src/test/java/generic/CmdModifierTest.java
Outdated
Show resolved
Hide resolved
…edRedis.getDockerClient()`
The
testMemoryLimitModified
was failing in cgroup2 environment because of the missing/sys/fs/cgroup/memory/memory.limit_in_bytes
file.In the cgroup2 environment a new file should be checked instead --
/sys/fs/cgroup/memory.max
.This commit intrdocues changes to
cat
both files:/sys/fs/cgroup/memory/memory.limit_in_bytes
from the first version of cgroup/sys/fs/cgroup/memory.max
from the secondSimilar issues:
In the test both files are
cat
ted, but only one of them will succeed.The attempt to
cat
the other one result in an error added toExecResult#stderr
.Is this acceptable in these tests?