We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7eb504a commit 66e6a2fCopy full SHA for 66e6a2f
docs/examples/junit4/generic/src/test/java/generic/CmdModifierTest.java
@@ -18,10 +18,15 @@ public class CmdModifierTest {
18
// }
19
20
// memory {
21
+ private long memoryInBytes = 8 * 1024 * 1024;
22
+ private long memorySwapInBytes = 12 * 1024 * 1024;
23
+
24
@Rule
25
public GenericContainer memoryLimitedRedis = new GenericContainer<>("redis:3.0.2")
- .withCreateContainerCmdModifier(cmd -> cmd.withMemory((long) 8 * 1024 * 1024))
- .withCreateContainerCmdModifier(cmd -> cmd.withMemorySwap((long) 12 * 1024 * 1024));
26
+ .withCreateContainerCmdModifier(cmd -> cmd.getHostConfig()
27
+ .withMemory(memoryInBytes)
28
+ .withMemorySwap(memorySwapInBytes)
29
+ );
30
31
32
0 commit comments