Skip to content

Commit 8319d46

Browse files
authored
Fix failing docs example test (#1300)
For some reason this test is now failing, probably due to insufficient memory being allocated for the process. Was failing, now fixed, for Docker for Mac Version 2.0.0.3 (31259)
1 parent bb9c10a commit 8319d46

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/examples/src/test/java/generic/CmdModifierTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public class CmdModifierTest {
2020
// memory {
2121
@Rule
2222
public GenericContainer memoryLimitedRedis = new GenericContainer<>("redis:3.0.2")
23-
.withCreateContainerCmdModifier(cmd -> cmd.withMemory((long) 4 * 1024 * 1024))
24-
.withCreateContainerCmdModifier(cmd -> cmd.withMemorySwap((long) 4 * 1024 * 1024));
23+
.withCreateContainerCmdModifier(cmd -> cmd.withMemory((long) 8 * 1024 * 1024))
24+
.withCreateContainerCmdModifier(cmd -> cmd.withMemorySwap((long) 12 * 1024 * 1024));
2525
// }
2626

2727

@@ -34,6 +34,6 @@ public void testHostnameModified() throws IOException, InterruptedException {
3434
@Test
3535
public void testMemoryLimitModified() throws IOException, InterruptedException {
3636
final Container.ExecResult execResult = memoryLimitedRedis.execInContainer("cat", "/sys/fs/cgroup/memory/memory.limit_in_bytes");
37-
assertEquals("4194304", execResult.getStdout().trim());
37+
assertEquals("8388608", execResult.getStdout().trim());
3838
}
3939
}

0 commit comments

Comments
 (0)